// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy of
// the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.
//
//------------------------------------------------------------------------------
// This code was generated by google-apis-code-generator 1.5.1
//
//  Changes to this file may cause incorrect behavior and will be lost if
//  the code is regenerated.
//------------------------------------------------------------------------------
#ifndef  GOOGLE_STORAGE_API_STORAGE_SERVICE_H_
#define  GOOGLE_STORAGE_API_STORAGE_SERVICE_H_

#include <string>
#include "googleapis/base/integral_types.h"
#include "googleapis/base/macros.h"
#include "googleapis/client/service/client_service.h"
#include "googleapis/client/service/media_uploader.h"
#include "googleapis/client/service/service_request_pager.h"
#include "googleapis/client/util/status.h"
#include "googleapis/client/util/uri_template.h"

#include "google/storage_api/bucket.h"
#include "google/storage_api/bucket_access_control.h"
#include "google/storage_api/bucket_access_controls.h"
#include "google/storage_api/buckets.h"
#include "google/storage_api/channel.h"
#include "google/storage_api/compose_request.h"
#include "google/storage_api/notification.h"
#include "google/storage_api/notifications.h"
#include "google/storage_api/object.h"
#include "google/storage_api/object_access_control.h"
#include "google/storage_api/object_access_controls.h"
#include "google/storage_api/objects.h"
#include "google/storage_api/policy.h"
#include "google/storage_api/rewrite_response.h"
#include "google/storage_api/service_account.h"
#include "google/storage_api/test_iam_permissions_response.h"


namespace google_storage_api {
using namespace googleapis;
/**
 * \mainpage
 *   Cloud Storage JSON API Version v1
 *
 * \section ApiInfo API Version Information
 *    <table>
 *      <tr><th>API
 *          <td><a href='https://developers.google.com/storage/docs/json_api/'>Cloud Storage JSON API</a>
 *      <tr><th>API Version<td>v1
 *      <tr><th>API Rev<td>20171004
 *      <tr><th>API Docs
 *          <td><a href='https://developers.google.com/storage/docs/json_api/'>
 *              https://developers.google.com/storage/docs/json_api/</a>
 *      <tr><th>Discovery Name<td>storage
 *    </table>
 *
 * \section ForMoreInfo For More Information
 *
 * The complete API documentation for using Cloud Storage JSON API can be found at
 * <a href='https://developers.google.com/storage/docs/json_api/'>https://developers.google.com/storage/docs/json_api/</a>.
 *
 * For more information about the Google APIs Client Library for C++, see
 * <a href='https://developers.google.com/api-client-library/cpp/start/get_started'>
 * https://developers.google.com/api-client-library/cpp/start/get_started</a>
 */
class StorageService;

/**
 * Implements a common base method for all methods within the StorageService.
 *
 * This class defines all the attributes common across all methods.
 * It does not pertain to any specific service API so is not normally
 * explicitly instantiated.
 */
class StorageServiceBaseRequest
      : public client::ClientServiceRequest {
 public:
  /**
   * Standard constructor.
   *
   * @param[in] service  The service instance to send to when executed.
   *        In practice this will be supplied internally by the service
   *        when it acts as a method factory.
   *
   * @param[in] credential  If not NULL then the credential to authorize with.
   *        In practice this is supplied by the user code that is creating
   *        the method instance.
   *
   * @param[in] method  The HTTP method to use for the underlying HTTP request.
   *        In practice this is specified by the particular API endpoint and
   *        supplied internally by the derived class for that endpoint.
   *
   * @param[in] uri_template  The <a href='http://tools.ietf.org/html/rfc6570'>
   *        RFC 6570 URI Template</a> specifying the url to invoke
   *        The parameters in the template should be resolvable attributes.
   *        In practice this parameter is supplied internally by the derived
   *        class for the endpoint.
   */
  StorageServiceBaseRequest(
      const client::ClientService* service,
      client::AuthorizationCredential* credential,
      client::HttpRequest::HttpMethod method,
      const string& uri_template);

  /**
   * Standard destructor.
   */
  virtual ~StorageServiceBaseRequest();


  /**
   * Clears the '<code>alt</code>' attribute so it is no longer set.
   */
  void clear_alt() {
    _have_alt_ = false;
    client::ClearCppValueHelper(&alt_);
  }


  /**
   * Gets the optional '<code>alt</code>' attribute.
   *
   * If the value is not set then the default value will be returned.
   */
  const string& get_alt() const { return alt_; }

  /**
   * Gets a modifiable pointer to the optional <code>alt</code>' attribute.
   *
   * @return  The value can be set by dereferencing the pointer.
   */
  string* mutable_alt() {
    _have_alt_ = true;
    return &alt_;
  }


  /**
   * Sets the '<code>alt</code>' attribute.
   *
   * @param[in] value Data format for the response.
   */
  void set_alt(const string& value) {
    _have_alt_ = true;
    alt_ = value;
  }



  /**
   * Clears the '<code>fields</code>' attribute so it is no longer set.
   */
  void clear_fields() {
    _have_fields_ = false;
    client::ClearCppValueHelper(&fields_);
  }


  /**
   * Gets the optional '<code>fields</code>' attribute.
   *
   * If the value is not set then the default value will be returned.
   */
  const string& get_fields() const { return fields_; }

  /**
   * Gets a modifiable pointer to the optional <code>fields</code>' attribute.
   *
   * @return  The value can be set by dereferencing the pointer.
   */
  string* mutable_fields() {
    _have_fields_ = true;
    return &fields_;
  }


  /**
   * Sets the '<code>fields</code>' attribute.
   *
   * @param[in] value Selector specifying which fields to include in a partial
   * response.
   */
  void set_fields(const string& value) {
    _have_fields_ = true;
    fields_ = value;
  }



  /**
   * Clears the '<code>key</code>' attribute so it is no longer set.
   */
  void clear_key() {
    _have_key_ = false;
    client::ClearCppValueHelper(&key_);
  }


  /**
   * Gets the optional '<code>key</code>' attribute.
   *
   * If the value is not set then the default value will be returned.
   */
  const string& get_key() const { return key_; }

  /**
   * Gets a modifiable pointer to the optional <code>key</code>' attribute.
   *
   * @return  The value can be set by dereferencing the pointer.
   */
  string* mutable_key() {
    _have_key_ = true;
    return &key_;
  }


  /**
   * Sets the '<code>key</code>' attribute.
   *
   * @param[in] value API key. Your API key identifies your project and provides
   * you with API access, quota, and reports. Required unless you provide an
   * OAuth 2.0 token.
   */
  void set_key(const string& value) {
    _have_key_ = true;
    key_ = value;
  }



  /**
   * Clears the '<code>oauth_token</code>' attribute so it is no longer set.
   */
  void clear_oauth_token() {
    _have_oauth_token_ = false;
    client::ClearCppValueHelper(&oauth_token_);
  }


  /**
   * Gets the optional '<code>oauth_token</code>' attribute.
   *
   * If the value is not set then the default value will be returned.
   */
  const string& get_oauth_token() const { return oauth_token_; }

  /**
   * Gets a modifiable pointer to the optional <code>oauth_token</code>'
   * attribute.
   *
   * @return  The value can be set by dereferencing the pointer.
   */
  string* mutable_oauthToken() {
    _have_oauth_token_ = true;
    return &oauth_token_;
  }


  /**
   * Sets the '<code>oauth_token</code>' attribute.
   *
   * @param[in] value OAuth 2.0 token for the current user.
   */
  void set_oauth_token(const string& value) {
    _have_oauth_token_ = true;
    oauth_token_ = value;
  }



  /**
   * Clears the '<code>prettyPrint</code>' attribute so it is no longer set.
   */
  void clear_pretty_print() {
    _have_pretty_print_ = false;
    client::ClearCppValueHelper(&pretty_print_);
  }


  /**
   * Gets the optional '<code>prettyPrint</code>' attribute.
   *
   * If the value is not set then the default value will be returned.
   */
  bool get_pretty_print() const { return pretty_print_; }

  /**
   * Sets the '<code>prettyPrint</code>' attribute.
   *
   * @param[in] value Returns response with indentations and line breaks.
   */
  void set_pretty_print(bool value) {
    _have_pretty_print_ = true;
    pretty_print_ = value;
  }

  /**
   * Clears the '<code>quotaUser</code>' attribute so it is no longer set.
   */
  void clear_quota_user() {
    _have_quota_user_ = false;
    client::ClearCppValueHelper(&quota_user_);
  }


  /**
   * Gets the optional '<code>quotaUser</code>' attribute.
   *
   * If the value is not set then the default value will be returned.
   */
  const string& get_quota_user() const { return quota_user_; }

  /**
   * Gets a modifiable pointer to the optional <code>quotaUser</code>'
   * attribute.
   *
   * @return  The value can be set by dereferencing the pointer.
   */
  string* mutable_quotaUser() {
    _have_quota_user_ = true;
    return &quota_user_;
  }


  /**
   * Sets the '<code>quotaUser</code>' attribute.
   *
   * @param[in] value Available to use for quota purposes for server-side
   * applications. Can be any arbitrary string assigned to a user, but should
   * not exceed 40 characters. Overrides userIp if both are provided.
   */
  void set_quota_user(const string& value) {
    _have_quota_user_ = true;
    quota_user_ = value;
  }



  /**
   * Clears the '<code>userIp</code>' attribute so it is no longer set.
   */
  void clear_user_ip() {
    _have_user_ip_ = false;
    client::ClearCppValueHelper(&user_ip_);
  }


  /**
   * Gets the optional '<code>userIp</code>' attribute.
   *
   * If the value is not set then the default value will be returned.
   */
  const string& get_user_ip() const { return user_ip_; }

  /**
   * Gets a modifiable pointer to the optional <code>userIp</code>' attribute.
   *
   * @return  The value can be set by dereferencing the pointer.
   */
  string* mutable_userIp() {
    _have_user_ip_ = true;
    return &user_ip_;
  }


  /**
   * Sets the '<code>userIp</code>' attribute.
   *
   * @param[in] value IP address of the site where the request originates. Use
   * this if you want to enforce per-user limits.
   */
  void set_user_ip(const string& value) {
    _have_user_ip_ = true;
    user_ip_ = value;
  }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the
   * URI supplied to the constructor.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
      const string& variable_name,
      const client::UriTemplateConfig& config,
      string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


 protected:
  /**
   * Prepares the method's HTTP request to send body content as JSON.
   *
   * Only to be used for method constructors.
   */
  void AddJsonContentToRequest(const client::JsonCppData *content);

 private:
  string alt_;
  string fields_;
  string key_;
  string oauth_token_;
  bool pretty_print_;
  string quota_user_;
  string user_ip_;
  bool _have_alt_ : 1;
  bool _have_fields_ : 1;
  bool _have_key_ : 1;
  bool _have_oauth_token_ : 1;
  bool _have_pretty_print_ : 1;
  bool _have_quota_user_ : 1;
  bool _have_user_ip_ : 1;

  DISALLOW_COPY_AND_ASSIGN(StorageServiceBaseRequest);
};



/**
 * Implements the delete method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 */
class BucketAccessControlsResource_DeleteMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   * @param[in] entity The entity holding the permission. Can be user-userId,
   * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
   * allAuthenticatedUsers.
   */
  BucketAccessControlsResource_DeleteMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const StringPiece& entity);

  /**
   * Standard destructor.
   */
  virtual ~BucketAccessControlsResource_DeleteMethod();


    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


 private:
  string bucket_;
  string entity_;
  string user_project_;
  bool _have_user_project_ : 1;
  DISALLOW_COPY_AND_ASSIGN(BucketAccessControlsResource_DeleteMethod);
};

/**
 * Implements the get method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 */
class BucketAccessControlsResource_GetMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   * @param[in] entity The entity holding the permission. Can be user-userId,
   * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
   * allAuthenticatedUsers.
   */
  BucketAccessControlsResource_GetMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const StringPiece& entity);

  /**
   * Standard destructor.
   */
  virtual ~BucketAccessControlsResource_GetMethod();


    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      BucketAccessControl* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string entity_;
  string user_project_;
  bool _have_user_project_ : 1;
  DISALLOW_COPY_AND_ASSIGN(BucketAccessControlsResource_GetMethod);
};

/**
 * Implements the insert method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 */
class BucketAccessControlsResource_InsertMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   * @param[in] _content_ The data object to insert.
   */
  BucketAccessControlsResource_InsertMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const BucketAccessControl& _content_);

  /**
   * Standard destructor.
   */
  virtual ~BucketAccessControlsResource_InsertMethod();


    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      BucketAccessControl* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string user_project_;
  bool _have_user_project_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(BucketAccessControlsResource_InsertMethod);
};

/**
 * Implements the list method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 */
class BucketAccessControlsResource_ListMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   */
  BucketAccessControlsResource_ListMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket);

  /**
   * Standard destructor.
   */
  virtual ~BucketAccessControlsResource_ListMethod();


    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      BucketAccessControls* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string user_project_;
  bool _have_user_project_ : 1;
  DISALLOW_COPY_AND_ASSIGN(BucketAccessControlsResource_ListMethod);
};

/**
 * Implements the patch method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 */
class BucketAccessControlsResource_PatchMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   * @param[in] entity The entity holding the permission. Can be user-userId,
   * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
   * allAuthenticatedUsers.
   * @param[in] _content_ The data object to patch.
   */
  BucketAccessControlsResource_PatchMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const StringPiece& entity,
      const BucketAccessControl& _content_);

  /**
   * Standard destructor.
   */
  virtual ~BucketAccessControlsResource_PatchMethod();


    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      BucketAccessControl* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string entity_;
  string user_project_;
  bool _have_user_project_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(BucketAccessControlsResource_PatchMethod);
};

/**
 * Implements the update method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 */
class BucketAccessControlsResource_UpdateMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   * @param[in] entity The entity holding the permission. Can be user-userId,
   * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
   * allAuthenticatedUsers.
   * @param[in] _content_ The data object to update.
   */
  BucketAccessControlsResource_UpdateMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const StringPiece& entity,
      const BucketAccessControl& _content_);

  /**
   * Standard destructor.
   */
  virtual ~BucketAccessControlsResource_UpdateMethod();


    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      BucketAccessControl* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string entity_;
  string user_project_;
  bool _have_user_project_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(BucketAccessControlsResource_UpdateMethod);
};



/**
 * Implements the delete method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 * https://www.googleapis.com/auth/devstorage.read_write
 */
class BucketsResource_DeleteMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   */
  BucketsResource_DeleteMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket);

  /**
   * Standard destructor.
   */
  virtual ~BucketsResource_DeleteMethod();


    /**
     * Clears the '<code>ifMetagenerationMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_match() {
      _have_if_metageneration_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_match() const { return if_metageneration_match_; }

    /**
     * Sets the '<code>ifMetagenerationMatch</code>' attribute.
     *
     * @param[in] value If set, only deletes the bucket if its metageneration
     * matches this value.
     */
    void set_if_metageneration_match(int64 value) {
      _have_if_metageneration_match_ = true;
      if_metageneration_match_ = value;
    }

    /**
     * Clears the '<code>ifMetagenerationNotMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_not_match() {
      _have_if_metageneration_not_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_not_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationNotMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_not_match() const { return if_metageneration_not_match_; }

    /**
     * Sets the '<code>ifMetagenerationNotMatch</code>' attribute.
     *
     * @param[in] value If set, only deletes the bucket if its metageneration
     * does not match this value.
     */
    void set_if_metageneration_not_match(int64 value) {
      _have_if_metageneration_not_match_ = true;
      if_metageneration_not_match_ = value;
    }

    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


 private:
  string bucket_;
  int64 if_metageneration_match_;
  int64 if_metageneration_not_match_;
  string user_project_;
  bool _have_if_metageneration_match_ : 1;
  bool _have_if_metageneration_not_match_ : 1;
  bool _have_user_project_ : 1;
  DISALLOW_COPY_AND_ASSIGN(BucketsResource_DeleteMethod);
};

/**
 * Implements the get method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/cloud-platform.read-only
 * https://www.googleapis.com/auth/devstorage.full_control
 * https://www.googleapis.com/auth/devstorage.read_only
 * https://www.googleapis.com/auth/devstorage.read_write
 */
class BucketsResource_GetMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   */
  BucketsResource_GetMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket);

  /**
   * Standard destructor.
   */
  virtual ~BucketsResource_GetMethod();


    /**
     * Clears the '<code>ifMetagenerationMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_match() {
      _have_if_metageneration_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_match() const { return if_metageneration_match_; }

    /**
     * Sets the '<code>ifMetagenerationMatch</code>' attribute.
     *
     * @param[in] value Makes the return of the bucket metadata conditional on
     * whether the bucket's current metageneration matches the given value.
     */
    void set_if_metageneration_match(int64 value) {
      _have_if_metageneration_match_ = true;
      if_metageneration_match_ = value;
    }

    /**
     * Clears the '<code>ifMetagenerationNotMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_not_match() {
      _have_if_metageneration_not_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_not_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationNotMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_not_match() const { return if_metageneration_not_match_; }

    /**
     * Sets the '<code>ifMetagenerationNotMatch</code>' attribute.
     *
     * @param[in] value Makes the return of the bucket metadata conditional on
     * whether the bucket's current metageneration does not match the given
     * value.
     */
    void set_if_metageneration_not_match(int64 value) {
      _have_if_metageneration_not_match_ = true;
      if_metageneration_not_match_ = value;
    }

    /**
     * Clears the '<code>projection</code>' attribute so it is no longer set.
     */
    void clear_projection() {
      _have_projection_ = false;
      client::ClearCppValueHelper(&projection_);
    }


    /**
     * Gets the optional '<code>projection</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_projection() const { return projection_; }

    /**
     * Gets a modifiable pointer to the optional <code>projection</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_projection() {
      _have_projection_ = true;
      return &projection_;
    }


    /**
     * Sets the '<code>projection</code>' attribute.
     *
     * @param[in] value Set of properties to return. Defaults to noAcl.
     */
    void set_projection(const string& value) {
      _have_projection_ = true;
      projection_ = value;
    }



    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Bucket* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  int64 if_metageneration_match_;
  int64 if_metageneration_not_match_;
  string projection_;
  string user_project_;
  bool _have_if_metageneration_match_ : 1;
  bool _have_if_metageneration_not_match_ : 1;
  bool _have_projection_ : 1;
  bool _have_user_project_ : 1;
  DISALLOW_COPY_AND_ASSIGN(BucketsResource_GetMethod);
};

/**
 * Implements the getIamPolicy method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/cloud-platform.read-only
 * https://www.googleapis.com/auth/devstorage.full_control
 * https://www.googleapis.com/auth/devstorage.read_only
 * https://www.googleapis.com/auth/devstorage.read_write
 */
class BucketsResource_GetIamPolicyMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   */
  BucketsResource_GetIamPolicyMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket);

  /**
   * Standard destructor.
   */
  virtual ~BucketsResource_GetIamPolicyMethod();


    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Policy* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string user_project_;
  bool _have_user_project_ : 1;
  DISALLOW_COPY_AND_ASSIGN(BucketsResource_GetIamPolicyMethod);
};

/**
 * Implements the insert method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 * https://www.googleapis.com/auth/devstorage.read_write
 */
class BucketsResource_InsertMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] project A valid API project identifier.
   * @param[in] _content_ The data object to insert.
   */
  BucketsResource_InsertMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& project,
      const Bucket& _content_);

  /**
   * Standard destructor.
   */
  virtual ~BucketsResource_InsertMethod();


    /**
     * Clears the '<code>predefinedAcl</code>' attribute so it is no longer set.
     */
    void clear_predefined_acl() {
      _have_predefined_acl_ = false;
      client::ClearCppValueHelper(&predefined_acl_);
    }


    /**
     * Gets the optional '<code>predefinedAcl</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_predefined_acl() const { return predefined_acl_; }

    /**
     * Gets a modifiable pointer to the optional <code>predefinedAcl</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_predefinedAcl() {
      _have_predefined_acl_ = true;
      return &predefined_acl_;
    }


    /**
     * Sets the '<code>predefinedAcl</code>' attribute.
     *
     * @param[in] value Apply a predefined set of access controls to this
     * bucket.
     */
    void set_predefined_acl(const string& value) {
      _have_predefined_acl_ = true;
      predefined_acl_ = value;
    }



    /**
     * Clears the '<code>predefinedDefaultObjectAcl</code>' attribute so it is
     * no longer set.
     */
    void clear_predefined_default_object_acl() {
      _have_predefined_default_object_acl_ = false;
      client::ClearCppValueHelper(&predefined_default_object_acl_);
    }


    /**
     * Gets the optional '<code>predefinedDefaultObjectAcl</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_predefined_default_object_acl() const { return predefined_default_object_acl_; }

    /**
     * Gets a modifiable pointer to the optional
     * <code>predefinedDefaultObjectAcl</code>' attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_predefinedDefaultObjectAcl() {
      _have_predefined_default_object_acl_ = true;
      return &predefined_default_object_acl_;
    }


    /**
     * Sets the '<code>predefinedDefaultObjectAcl</code>' attribute.
     *
     * @param[in] value Apply a predefined set of default object access controls
     * to this bucket.
     */
    void set_predefined_default_object_acl(const string& value) {
      _have_predefined_default_object_acl_ = true;
      predefined_default_object_acl_ = value;
    }



    /**
     * Clears the '<code>projection</code>' attribute so it is no longer set.
     */
    void clear_projection() {
      _have_projection_ = false;
      client::ClearCppValueHelper(&projection_);
    }


    /**
     * Gets the optional '<code>projection</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_projection() const { return projection_; }

    /**
     * Gets a modifiable pointer to the optional <code>projection</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_projection() {
      _have_projection_ = true;
      return &projection_;
    }


    /**
     * Sets the '<code>projection</code>' attribute.
     *
     * @param[in] value Set of properties to return. Defaults to noAcl, unless
     * the bucket resource specifies acl or defaultObjectAcl properties, when it
     * defaults to full.
     */
    void set_projection(const string& value) {
      _have_projection_ = true;
      projection_ = value;
    }



    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Bucket* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string project_;
  string predefined_acl_;
  string predefined_default_object_acl_;
  string projection_;
  string user_project_;
  bool _have_predefined_acl_ : 1;
  bool _have_predefined_default_object_acl_ : 1;
  bool _have_projection_ : 1;
  bool _have_user_project_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(BucketsResource_InsertMethod);
};

/**
 * Implements the list method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/cloud-platform.read-only
 * https://www.googleapis.com/auth/devstorage.full_control
 * https://www.googleapis.com/auth/devstorage.read_only
 * https://www.googleapis.com/auth/devstorage.read_write
 */
class BucketsResource_ListMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] project A valid API project identifier.
   */
  BucketsResource_ListMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& project);

  /**
   * Standard destructor.
   */
  virtual ~BucketsResource_ListMethod();


    /**
     * Clears the '<code>maxResults</code>' attribute so it is no longer set.
     */
    void clear_max_results() {
      _have_max_results_ = false;
      client::ClearCppValueHelper(&max_results_);
    }


    /**
     * Gets the optional '<code>maxResults</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    uint32 get_max_results() const { return max_results_; }

    /**
     * Sets the '<code>maxResults</code>' attribute.
     *
     * @param[in] value Maximum number of buckets to return in a single
     * response. The service will use this parameter or 1,000 items, whichever
     * is smaller.
     */
    void set_max_results(uint32 value) {
      _have_max_results_ = true;
      max_results_ = value;
    }

    /**
     * Clears the '<code>pageToken</code>' attribute so it is no longer set.
     */
    void clear_page_token() {
      _have_page_token_ = false;
      client::ClearCppValueHelper(&page_token_);
    }


    /**
     * Gets the optional '<code>pageToken</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_page_token() const { return page_token_; }

    /**
     * Gets a modifiable pointer to the optional <code>pageToken</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_pageToken() {
      _have_page_token_ = true;
      return &page_token_;
    }


    /**
     * Sets the '<code>pageToken</code>' attribute.
     *
     * @param[in] value A previously-returned page token representing part of
     * the larger set of results to view.
     */
    void set_page_token(const string& value) {
      _have_page_token_ = true;
      page_token_ = value;
    }



    /**
     * Clears the '<code>prefix</code>' attribute so it is no longer set.
     */
    void clear_prefix() {
      _have_prefix_ = false;
      client::ClearCppValueHelper(&prefix_);
    }


    /**
     * Gets the optional '<code>prefix</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_prefix() const { return prefix_; }

    /**
     * Gets a modifiable pointer to the optional <code>prefix</code>' attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_prefix() {
      _have_prefix_ = true;
      return &prefix_;
    }


    /**
     * Sets the '<code>prefix</code>' attribute.
     *
     * @param[in] value Filter results to buckets whose names begin with this
     * prefix.
     */
    void set_prefix(const string& value) {
      _have_prefix_ = true;
      prefix_ = value;
    }



    /**
     * Clears the '<code>projection</code>' attribute so it is no longer set.
     */
    void clear_projection() {
      _have_projection_ = false;
      client::ClearCppValueHelper(&projection_);
    }


    /**
     * Gets the optional '<code>projection</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_projection() const { return projection_; }

    /**
     * Gets a modifiable pointer to the optional <code>projection</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_projection() {
      _have_projection_ = true;
      return &projection_;
    }


    /**
     * Sets the '<code>projection</code>' attribute.
     *
     * @param[in] value Set of properties to return. Defaults to noAcl.
     */
    void set_projection(const string& value) {
      _have_projection_ = true;
      projection_ = value;
    }



    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Buckets* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string project_;
  uint32 max_results_;
  string page_token_;
  string prefix_;
  string projection_;
  string user_project_;
  bool _have_max_results_ : 1;
  bool _have_page_token_ : 1;
  bool _have_prefix_ : 1;
  bool _have_projection_ : 1;
  bool _have_user_project_ : 1;
  DISALLOW_COPY_AND_ASSIGN(BucketsResource_ListMethod);
};

typedef client::ServiceRequestPager<
            BucketsResource_ListMethod,
            Buckets>
        BucketsResource_ListMethodPager;

/**
 * Implements the patch method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 */
class BucketsResource_PatchMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   * @param[in] _content_ The data object to patch.
   */
  BucketsResource_PatchMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const Bucket& _content_);

  /**
   * Standard destructor.
   */
  virtual ~BucketsResource_PatchMethod();


    /**
     * Clears the '<code>ifMetagenerationMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_match() {
      _have_if_metageneration_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_match() const { return if_metageneration_match_; }

    /**
     * Sets the '<code>ifMetagenerationMatch</code>' attribute.
     *
     * @param[in] value Makes the return of the bucket metadata conditional on
     * whether the bucket's current metageneration matches the given value.
     */
    void set_if_metageneration_match(int64 value) {
      _have_if_metageneration_match_ = true;
      if_metageneration_match_ = value;
    }

    /**
     * Clears the '<code>ifMetagenerationNotMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_not_match() {
      _have_if_metageneration_not_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_not_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationNotMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_not_match() const { return if_metageneration_not_match_; }

    /**
     * Sets the '<code>ifMetagenerationNotMatch</code>' attribute.
     *
     * @param[in] value Makes the return of the bucket metadata conditional on
     * whether the bucket's current metageneration does not match the given
     * value.
     */
    void set_if_metageneration_not_match(int64 value) {
      _have_if_metageneration_not_match_ = true;
      if_metageneration_not_match_ = value;
    }

    /**
     * Clears the '<code>predefinedAcl</code>' attribute so it is no longer set.
     */
    void clear_predefined_acl() {
      _have_predefined_acl_ = false;
      client::ClearCppValueHelper(&predefined_acl_);
    }


    /**
     * Gets the optional '<code>predefinedAcl</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_predefined_acl() const { return predefined_acl_; }

    /**
     * Gets a modifiable pointer to the optional <code>predefinedAcl</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_predefinedAcl() {
      _have_predefined_acl_ = true;
      return &predefined_acl_;
    }


    /**
     * Sets the '<code>predefinedAcl</code>' attribute.
     *
     * @param[in] value Apply a predefined set of access controls to this
     * bucket.
     */
    void set_predefined_acl(const string& value) {
      _have_predefined_acl_ = true;
      predefined_acl_ = value;
    }



    /**
     * Clears the '<code>predefinedDefaultObjectAcl</code>' attribute so it is
     * no longer set.
     */
    void clear_predefined_default_object_acl() {
      _have_predefined_default_object_acl_ = false;
      client::ClearCppValueHelper(&predefined_default_object_acl_);
    }


    /**
     * Gets the optional '<code>predefinedDefaultObjectAcl</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_predefined_default_object_acl() const { return predefined_default_object_acl_; }

    /**
     * Gets a modifiable pointer to the optional
     * <code>predefinedDefaultObjectAcl</code>' attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_predefinedDefaultObjectAcl() {
      _have_predefined_default_object_acl_ = true;
      return &predefined_default_object_acl_;
    }


    /**
     * Sets the '<code>predefinedDefaultObjectAcl</code>' attribute.
     *
     * @param[in] value Apply a predefined set of default object access controls
     * to this bucket.
     */
    void set_predefined_default_object_acl(const string& value) {
      _have_predefined_default_object_acl_ = true;
      predefined_default_object_acl_ = value;
    }



    /**
     * Clears the '<code>projection</code>' attribute so it is no longer set.
     */
    void clear_projection() {
      _have_projection_ = false;
      client::ClearCppValueHelper(&projection_);
    }


    /**
     * Gets the optional '<code>projection</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_projection() const { return projection_; }

    /**
     * Gets a modifiable pointer to the optional <code>projection</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_projection() {
      _have_projection_ = true;
      return &projection_;
    }


    /**
     * Sets the '<code>projection</code>' attribute.
     *
     * @param[in] value Set of properties to return. Defaults to full.
     */
    void set_projection(const string& value) {
      _have_projection_ = true;
      projection_ = value;
    }



    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Bucket* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  int64 if_metageneration_match_;
  int64 if_metageneration_not_match_;
  string predefined_acl_;
  string predefined_default_object_acl_;
  string projection_;
  string user_project_;
  bool _have_if_metageneration_match_ : 1;
  bool _have_if_metageneration_not_match_ : 1;
  bool _have_predefined_acl_ : 1;
  bool _have_predefined_default_object_acl_ : 1;
  bool _have_projection_ : 1;
  bool _have_user_project_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(BucketsResource_PatchMethod);
};

/**
 * Implements the setIamPolicy method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 * https://www.googleapis.com/auth/devstorage.read_write
 */
class BucketsResource_SetIamPolicyMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   * @param[in] _content_ The data object to setIamPolicy.
   */
  BucketsResource_SetIamPolicyMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const Policy& _content_);

  /**
   * Standard destructor.
   */
  virtual ~BucketsResource_SetIamPolicyMethod();


    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Policy* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string user_project_;
  bool _have_user_project_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(BucketsResource_SetIamPolicyMethod);
};

/**
 * Implements the testIamPermissions method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/cloud-platform.read-only
 * https://www.googleapis.com/auth/devstorage.full_control
 * https://www.googleapis.com/auth/devstorage.read_only
 * https://www.googleapis.com/auth/devstorage.read_write
 */
class BucketsResource_TestIamPermissionsMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   * @param[in] permissions Permissions to test.
   */
  BucketsResource_TestIamPermissionsMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const client::JsonCppArray<string >& permissions);

  /**
   * Standard destructor.
   */
  virtual ~BucketsResource_TestIamPermissionsMethod();


    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      TestIamPermissionsResponse* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  client::JsonCppArray<string > permissions_;
  string user_project_;
  bool _have_user_project_ : 1;
  DISALLOW_COPY_AND_ASSIGN(BucketsResource_TestIamPermissionsMethod);
};

/**
 * Implements the update method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 */
class BucketsResource_UpdateMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   * @param[in] _content_ The data object to update.
   */
  BucketsResource_UpdateMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const Bucket& _content_);

  /**
   * Standard destructor.
   */
  virtual ~BucketsResource_UpdateMethod();


    /**
     * Clears the '<code>ifMetagenerationMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_match() {
      _have_if_metageneration_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_match() const { return if_metageneration_match_; }

    /**
     * Sets the '<code>ifMetagenerationMatch</code>' attribute.
     *
     * @param[in] value Makes the return of the bucket metadata conditional on
     * whether the bucket's current metageneration matches the given value.
     */
    void set_if_metageneration_match(int64 value) {
      _have_if_metageneration_match_ = true;
      if_metageneration_match_ = value;
    }

    /**
     * Clears the '<code>ifMetagenerationNotMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_not_match() {
      _have_if_metageneration_not_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_not_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationNotMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_not_match() const { return if_metageneration_not_match_; }

    /**
     * Sets the '<code>ifMetagenerationNotMatch</code>' attribute.
     *
     * @param[in] value Makes the return of the bucket metadata conditional on
     * whether the bucket's current metageneration does not match the given
     * value.
     */
    void set_if_metageneration_not_match(int64 value) {
      _have_if_metageneration_not_match_ = true;
      if_metageneration_not_match_ = value;
    }

    /**
     * Clears the '<code>predefinedAcl</code>' attribute so it is no longer set.
     */
    void clear_predefined_acl() {
      _have_predefined_acl_ = false;
      client::ClearCppValueHelper(&predefined_acl_);
    }


    /**
     * Gets the optional '<code>predefinedAcl</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_predefined_acl() const { return predefined_acl_; }

    /**
     * Gets a modifiable pointer to the optional <code>predefinedAcl</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_predefinedAcl() {
      _have_predefined_acl_ = true;
      return &predefined_acl_;
    }


    /**
     * Sets the '<code>predefinedAcl</code>' attribute.
     *
     * @param[in] value Apply a predefined set of access controls to this
     * bucket.
     */
    void set_predefined_acl(const string& value) {
      _have_predefined_acl_ = true;
      predefined_acl_ = value;
    }



    /**
     * Clears the '<code>predefinedDefaultObjectAcl</code>' attribute so it is
     * no longer set.
     */
    void clear_predefined_default_object_acl() {
      _have_predefined_default_object_acl_ = false;
      client::ClearCppValueHelper(&predefined_default_object_acl_);
    }


    /**
     * Gets the optional '<code>predefinedDefaultObjectAcl</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_predefined_default_object_acl() const { return predefined_default_object_acl_; }

    /**
     * Gets a modifiable pointer to the optional
     * <code>predefinedDefaultObjectAcl</code>' attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_predefinedDefaultObjectAcl() {
      _have_predefined_default_object_acl_ = true;
      return &predefined_default_object_acl_;
    }


    /**
     * Sets the '<code>predefinedDefaultObjectAcl</code>' attribute.
     *
     * @param[in] value Apply a predefined set of default object access controls
     * to this bucket.
     */
    void set_predefined_default_object_acl(const string& value) {
      _have_predefined_default_object_acl_ = true;
      predefined_default_object_acl_ = value;
    }



    /**
     * Clears the '<code>projection</code>' attribute so it is no longer set.
     */
    void clear_projection() {
      _have_projection_ = false;
      client::ClearCppValueHelper(&projection_);
    }


    /**
     * Gets the optional '<code>projection</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_projection() const { return projection_; }

    /**
     * Gets a modifiable pointer to the optional <code>projection</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_projection() {
      _have_projection_ = true;
      return &projection_;
    }


    /**
     * Sets the '<code>projection</code>' attribute.
     *
     * @param[in] value Set of properties to return. Defaults to full.
     */
    void set_projection(const string& value) {
      _have_projection_ = true;
      projection_ = value;
    }



    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Bucket* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  int64 if_metageneration_match_;
  int64 if_metageneration_not_match_;
  string predefined_acl_;
  string predefined_default_object_acl_;
  string projection_;
  string user_project_;
  bool _have_if_metageneration_match_ : 1;
  bool _have_if_metageneration_not_match_ : 1;
  bool _have_predefined_acl_ : 1;
  bool _have_predefined_default_object_acl_ : 1;
  bool _have_projection_ : 1;
  bool _have_user_project_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(BucketsResource_UpdateMethod);
};



/**
 * Implements the stop method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/cloud-platform.read-only
 * https://www.googleapis.com/auth/devstorage.full_control
 * https://www.googleapis.com/auth/devstorage.read_only
 * https://www.googleapis.com/auth/devstorage.read_write
 */
class ChannelsResource_StopMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] _content_ The data object to stop.
   */
  ChannelsResource_StopMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const Channel& _content_);

  /**
   * Standard destructor.
   */
  virtual ~ChannelsResource_StopMethod();

 private:
  string _content_;
  DISALLOW_COPY_AND_ASSIGN(ChannelsResource_StopMethod);
};



/**
 * Implements the delete method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 */
class DefaultObjectAccessControlsResource_DeleteMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   * @param[in] entity The entity holding the permission. Can be user-userId,
   * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
   * allAuthenticatedUsers.
   */
  DefaultObjectAccessControlsResource_DeleteMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const StringPiece& entity);

  /**
   * Standard destructor.
   */
  virtual ~DefaultObjectAccessControlsResource_DeleteMethod();


    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


 private:
  string bucket_;
  string entity_;
  string user_project_;
  bool _have_user_project_ : 1;
  DISALLOW_COPY_AND_ASSIGN(DefaultObjectAccessControlsResource_DeleteMethod);
};

/**
 * Implements the get method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 */
class DefaultObjectAccessControlsResource_GetMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   * @param[in] entity The entity holding the permission. Can be user-userId,
   * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
   * allAuthenticatedUsers.
   */
  DefaultObjectAccessControlsResource_GetMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const StringPiece& entity);

  /**
   * Standard destructor.
   */
  virtual ~DefaultObjectAccessControlsResource_GetMethod();


    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      ObjectAccessControl* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string entity_;
  string user_project_;
  bool _have_user_project_ : 1;
  DISALLOW_COPY_AND_ASSIGN(DefaultObjectAccessControlsResource_GetMethod);
};

/**
 * Implements the insert method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 */
class DefaultObjectAccessControlsResource_InsertMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   * @param[in] _content_ The data object to insert.
   */
  DefaultObjectAccessControlsResource_InsertMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const ObjectAccessControl& _content_);

  /**
   * Standard destructor.
   */
  virtual ~DefaultObjectAccessControlsResource_InsertMethod();


    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      ObjectAccessControl* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string user_project_;
  bool _have_user_project_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(DefaultObjectAccessControlsResource_InsertMethod);
};

/**
 * Implements the list method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 */
class DefaultObjectAccessControlsResource_ListMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   */
  DefaultObjectAccessControlsResource_ListMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket);

  /**
   * Standard destructor.
   */
  virtual ~DefaultObjectAccessControlsResource_ListMethod();


    /**
     * Clears the '<code>ifMetagenerationMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_match() {
      _have_if_metageneration_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_match() const { return if_metageneration_match_; }

    /**
     * Sets the '<code>ifMetagenerationMatch</code>' attribute.
     *
     * @param[in] value If present, only return default ACL listing if the
     * bucket's current metageneration matches this value.
     */
    void set_if_metageneration_match(int64 value) {
      _have_if_metageneration_match_ = true;
      if_metageneration_match_ = value;
    }

    /**
     * Clears the '<code>ifMetagenerationNotMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_not_match() {
      _have_if_metageneration_not_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_not_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationNotMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_not_match() const { return if_metageneration_not_match_; }

    /**
     * Sets the '<code>ifMetagenerationNotMatch</code>' attribute.
     *
     * @param[in] value If present, only return default ACL listing if the
     * bucket's current metageneration does not match the given value.
     */
    void set_if_metageneration_not_match(int64 value) {
      _have_if_metageneration_not_match_ = true;
      if_metageneration_not_match_ = value;
    }

    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      ObjectAccessControls* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  int64 if_metageneration_match_;
  int64 if_metageneration_not_match_;
  string user_project_;
  bool _have_if_metageneration_match_ : 1;
  bool _have_if_metageneration_not_match_ : 1;
  bool _have_user_project_ : 1;
  DISALLOW_COPY_AND_ASSIGN(DefaultObjectAccessControlsResource_ListMethod);
};

/**
 * Implements the patch method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 */
class DefaultObjectAccessControlsResource_PatchMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   * @param[in] entity The entity holding the permission. Can be user-userId,
   * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
   * allAuthenticatedUsers.
   * @param[in] _content_ The data object to patch.
   */
  DefaultObjectAccessControlsResource_PatchMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const StringPiece& entity,
      const ObjectAccessControl& _content_);

  /**
   * Standard destructor.
   */
  virtual ~DefaultObjectAccessControlsResource_PatchMethod();


    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      ObjectAccessControl* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string entity_;
  string user_project_;
  bool _have_user_project_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(DefaultObjectAccessControlsResource_PatchMethod);
};

/**
 * Implements the update method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 */
class DefaultObjectAccessControlsResource_UpdateMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   * @param[in] entity The entity holding the permission. Can be user-userId,
   * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
   * allAuthenticatedUsers.
   * @param[in] _content_ The data object to update.
   */
  DefaultObjectAccessControlsResource_UpdateMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const StringPiece& entity,
      const ObjectAccessControl& _content_);

  /**
   * Standard destructor.
   */
  virtual ~DefaultObjectAccessControlsResource_UpdateMethod();


    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      ObjectAccessControl* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string entity_;
  string user_project_;
  bool _have_user_project_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(DefaultObjectAccessControlsResource_UpdateMethod);
};



/**
 * Implements the delete method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 * https://www.googleapis.com/auth/devstorage.read_write
 */
class NotificationsResource_DeleteMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket The parent bucket of the notification.
   * @param[in] notification ID of the notification to delete.
   */
  NotificationsResource_DeleteMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const StringPiece& notification);

  /**
   * Standard destructor.
   */
  virtual ~NotificationsResource_DeleteMethod();


    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


 private:
  string bucket_;
  string notification_;
  string user_project_;
  bool _have_user_project_ : 1;
  DISALLOW_COPY_AND_ASSIGN(NotificationsResource_DeleteMethod);
};

/**
 * Implements the get method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/cloud-platform.read-only
 * https://www.googleapis.com/auth/devstorage.full_control
 * https://www.googleapis.com/auth/devstorage.read_only
 * https://www.googleapis.com/auth/devstorage.read_write
 */
class NotificationsResource_GetMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket The parent bucket of the notification.
   * @param[in] notification Notification ID.
   */
  NotificationsResource_GetMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const StringPiece& notification);

  /**
   * Standard destructor.
   */
  virtual ~NotificationsResource_GetMethod();


    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Notification* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string notification_;
  string user_project_;
  bool _have_user_project_ : 1;
  DISALLOW_COPY_AND_ASSIGN(NotificationsResource_GetMethod);
};

/**
 * Implements the insert method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 * https://www.googleapis.com/auth/devstorage.read_write
 */
class NotificationsResource_InsertMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket The parent bucket of the notification.
   * @param[in] _content_ The data object to insert.
   */
  NotificationsResource_InsertMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const Notification& _content_);

  /**
   * Standard destructor.
   */
  virtual ~NotificationsResource_InsertMethod();


    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Notification* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string user_project_;
  bool _have_user_project_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(NotificationsResource_InsertMethod);
};

/**
 * Implements the list method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/cloud-platform.read-only
 * https://www.googleapis.com/auth/devstorage.full_control
 * https://www.googleapis.com/auth/devstorage.read_only
 * https://www.googleapis.com/auth/devstorage.read_write
 */
class NotificationsResource_ListMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a Google Cloud Storage bucket.
   */
  NotificationsResource_ListMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket);

  /**
   * Standard destructor.
   */
  virtual ~NotificationsResource_ListMethod();


    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Notifications* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string user_project_;
  bool _have_user_project_ : 1;
  DISALLOW_COPY_AND_ASSIGN(NotificationsResource_ListMethod);
};



/**
 * Implements the delete method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 */
class ObjectAccessControlsResource_DeleteMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   * @param[in] object Name of the object. For information about how to URL
   * encode object names to be path safe, see Encoding URI Path Parts.
   * @param[in] entity The entity holding the permission. Can be user-userId,
   * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
   * allAuthenticatedUsers.
   */
  ObjectAccessControlsResource_DeleteMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const StringPiece& object,
      const StringPiece& entity);

  /**
   * Standard destructor.
   */
  virtual ~ObjectAccessControlsResource_DeleteMethod();


    /**
     * Clears the '<code>generation</code>' attribute so it is no longer set.
     */
    void clear_generation() {
      _have_generation_ = false;
      client::ClearCppValueHelper(&generation_);
    }


    /**
     * Gets the optional '<code>generation</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_generation() const { return generation_; }

    /**
     * Sets the '<code>generation</code>' attribute.
     *
     * @param[in] value If present, selects a specific revision of this object
     * (as opposed to the latest version, the default).
     */
    void set_generation(int64 value) {
      _have_generation_ = true;
      generation_ = value;
    }

    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


 private:
  string bucket_;
  string object_;
  string entity_;
  int64 generation_;
  string user_project_;
  bool _have_generation_ : 1;
  bool _have_user_project_ : 1;
  DISALLOW_COPY_AND_ASSIGN(ObjectAccessControlsResource_DeleteMethod);
};

/**
 * Implements the get method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 */
class ObjectAccessControlsResource_GetMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   * @param[in] object Name of the object. For information about how to URL
   * encode object names to be path safe, see Encoding URI Path Parts.
   * @param[in] entity The entity holding the permission. Can be user-userId,
   * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
   * allAuthenticatedUsers.
   */
  ObjectAccessControlsResource_GetMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const StringPiece& object,
      const StringPiece& entity);

  /**
   * Standard destructor.
   */
  virtual ~ObjectAccessControlsResource_GetMethod();


    /**
     * Clears the '<code>generation</code>' attribute so it is no longer set.
     */
    void clear_generation() {
      _have_generation_ = false;
      client::ClearCppValueHelper(&generation_);
    }


    /**
     * Gets the optional '<code>generation</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_generation() const { return generation_; }

    /**
     * Sets the '<code>generation</code>' attribute.
     *
     * @param[in] value If present, selects a specific revision of this object
     * (as opposed to the latest version, the default).
     */
    void set_generation(int64 value) {
      _have_generation_ = true;
      generation_ = value;
    }

    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      ObjectAccessControl* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string object_;
  string entity_;
  int64 generation_;
  string user_project_;
  bool _have_generation_ : 1;
  bool _have_user_project_ : 1;
  DISALLOW_COPY_AND_ASSIGN(ObjectAccessControlsResource_GetMethod);
};

/**
 * Implements the insert method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 */
class ObjectAccessControlsResource_InsertMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   * @param[in] object Name of the object. For information about how to URL
   * encode object names to be path safe, see Encoding URI Path Parts.
   * @param[in] _content_ The data object to insert.
   */
  ObjectAccessControlsResource_InsertMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const StringPiece& object,
      const ObjectAccessControl& _content_);

  /**
   * Standard destructor.
   */
  virtual ~ObjectAccessControlsResource_InsertMethod();


    /**
     * Clears the '<code>generation</code>' attribute so it is no longer set.
     */
    void clear_generation() {
      _have_generation_ = false;
      client::ClearCppValueHelper(&generation_);
    }


    /**
     * Gets the optional '<code>generation</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_generation() const { return generation_; }

    /**
     * Sets the '<code>generation</code>' attribute.
     *
     * @param[in] value If present, selects a specific revision of this object
     * (as opposed to the latest version, the default).
     */
    void set_generation(int64 value) {
      _have_generation_ = true;
      generation_ = value;
    }

    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      ObjectAccessControl* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string object_;
  int64 generation_;
  string user_project_;
  bool _have_generation_ : 1;
  bool _have_user_project_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(ObjectAccessControlsResource_InsertMethod);
};

/**
 * Implements the list method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 */
class ObjectAccessControlsResource_ListMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   * @param[in] object Name of the object. For information about how to URL
   * encode object names to be path safe, see Encoding URI Path Parts.
   */
  ObjectAccessControlsResource_ListMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const StringPiece& object);

  /**
   * Standard destructor.
   */
  virtual ~ObjectAccessControlsResource_ListMethod();


    /**
     * Clears the '<code>generation</code>' attribute so it is no longer set.
     */
    void clear_generation() {
      _have_generation_ = false;
      client::ClearCppValueHelper(&generation_);
    }


    /**
     * Gets the optional '<code>generation</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_generation() const { return generation_; }

    /**
     * Sets the '<code>generation</code>' attribute.
     *
     * @param[in] value If present, selects a specific revision of this object
     * (as opposed to the latest version, the default).
     */
    void set_generation(int64 value) {
      _have_generation_ = true;
      generation_ = value;
    }

    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      ObjectAccessControls* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string object_;
  int64 generation_;
  string user_project_;
  bool _have_generation_ : 1;
  bool _have_user_project_ : 1;
  DISALLOW_COPY_AND_ASSIGN(ObjectAccessControlsResource_ListMethod);
};

/**
 * Implements the patch method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 */
class ObjectAccessControlsResource_PatchMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   * @param[in] object Name of the object. For information about how to URL
   * encode object names to be path safe, see Encoding URI Path Parts.
   * @param[in] entity The entity holding the permission. Can be user-userId,
   * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
   * allAuthenticatedUsers.
   * @param[in] _content_ The data object to patch.
   */
  ObjectAccessControlsResource_PatchMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const StringPiece& object,
      const StringPiece& entity,
      const ObjectAccessControl& _content_);

  /**
   * Standard destructor.
   */
  virtual ~ObjectAccessControlsResource_PatchMethod();


    /**
     * Clears the '<code>generation</code>' attribute so it is no longer set.
     */
    void clear_generation() {
      _have_generation_ = false;
      client::ClearCppValueHelper(&generation_);
    }


    /**
     * Gets the optional '<code>generation</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_generation() const { return generation_; }

    /**
     * Sets the '<code>generation</code>' attribute.
     *
     * @param[in] value If present, selects a specific revision of this object
     * (as opposed to the latest version, the default).
     */
    void set_generation(int64 value) {
      _have_generation_ = true;
      generation_ = value;
    }

    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      ObjectAccessControl* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string object_;
  string entity_;
  int64 generation_;
  string user_project_;
  bool _have_generation_ : 1;
  bool _have_user_project_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(ObjectAccessControlsResource_PatchMethod);
};

/**
 * Implements the update method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 */
class ObjectAccessControlsResource_UpdateMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of a bucket.
   * @param[in] object Name of the object. For information about how to URL
   * encode object names to be path safe, see Encoding URI Path Parts.
   * @param[in] entity The entity holding the permission. Can be user-userId,
   * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
   * allAuthenticatedUsers.
   * @param[in] _content_ The data object to update.
   */
  ObjectAccessControlsResource_UpdateMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const StringPiece& object,
      const StringPiece& entity,
      const ObjectAccessControl& _content_);

  /**
   * Standard destructor.
   */
  virtual ~ObjectAccessControlsResource_UpdateMethod();


    /**
     * Clears the '<code>generation</code>' attribute so it is no longer set.
     */
    void clear_generation() {
      _have_generation_ = false;
      client::ClearCppValueHelper(&generation_);
    }


    /**
     * Gets the optional '<code>generation</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_generation() const { return generation_; }

    /**
     * Sets the '<code>generation</code>' attribute.
     *
     * @param[in] value If present, selects a specific revision of this object
     * (as opposed to the latest version, the default).
     */
    void set_generation(int64 value) {
      _have_generation_ = true;
      generation_ = value;
    }

    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      ObjectAccessControl* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string object_;
  string entity_;
  int64 generation_;
  string user_project_;
  bool _have_generation_ : 1;
  bool _have_user_project_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(ObjectAccessControlsResource_UpdateMethod);
};



/**
 * Implements the compose method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 * https://www.googleapis.com/auth/devstorage.read_write
 */
class ObjectsResource_ComposeMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] destination_bucket Name of the bucket in which to store the new
   * object.
   * @param[in] destination_object Name of the new object. For information about
   * how to URL encode object names to be path safe, see Encoding URI Path
   * Parts.
   * @param[in] _content_ The data object to compose.
   */
  ObjectsResource_ComposeMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& destination_bucket,
      const StringPiece& destination_object,
      const ComposeRequest& _content_);

  /**
   * Standard destructor.
   */
  virtual ~ObjectsResource_ComposeMethod();


    /**
     * Clears the '<code>destinationPredefinedAcl</code>' attribute so it is no
     * longer set.
     */
    void clear_destination_predefined_acl() {
      _have_destination_predefined_acl_ = false;
      client::ClearCppValueHelper(&destination_predefined_acl_);
    }


    /**
     * Gets the optional '<code>destinationPredefinedAcl</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_destination_predefined_acl() const { return destination_predefined_acl_; }

    /**
     * Gets a modifiable pointer to the optional
     * <code>destinationPredefinedAcl</code>' attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_destinationPredefinedAcl() {
      _have_destination_predefined_acl_ = true;
      return &destination_predefined_acl_;
    }


    /**
     * Sets the '<code>destinationPredefinedAcl</code>' attribute.
     *
     * @param[in] value Apply a predefined set of access controls to the
     * destination object.
     */
    void set_destination_predefined_acl(const string& value) {
      _have_destination_predefined_acl_ = true;
      destination_predefined_acl_ = value;
    }



    /**
     * Clears the '<code>ifGenerationMatch</code>' attribute so it is no longer
     * set.
     */
    void clear_if_generation_match() {
      _have_if_generation_match_ = false;
      client::ClearCppValueHelper(&if_generation_match_);
    }


    /**
     * Gets the optional '<code>ifGenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_generation_match() const { return if_generation_match_; }

    /**
     * Sets the '<code>ifGenerationMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the object's
     * current generation matches the given value. Setting to 0 makes the
     * operation succeed only if there are no live versions of the object.
     */
    void set_if_generation_match(int64 value) {
      _have_if_generation_match_ = true;
      if_generation_match_ = value;
    }

    /**
     * Clears the '<code>ifMetagenerationMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_match() {
      _have_if_metageneration_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_match() const { return if_metageneration_match_; }

    /**
     * Sets the '<code>ifMetagenerationMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the object's
     * current metageneration matches the given value.
     */
    void set_if_metageneration_match(int64 value) {
      _have_if_metageneration_match_ = true;
      if_metageneration_match_ = value;
    }

    /**
     * Clears the '<code>kmsKeyName</code>' attribute so it is no longer set.
     */
    void clear_kms_key_name() {
      _have_kms_key_name_ = false;
      client::ClearCppValueHelper(&kms_key_name_);
    }


    /**
     * Gets the optional '<code>kmsKeyName</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_kms_key_name() const { return kms_key_name_; }

    /**
     * Gets a modifiable pointer to the optional <code>kmsKeyName</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_kmsKeyName() {
      _have_kms_key_name_ = true;
      return &kms_key_name_;
    }


    /**
     * Sets the '<code>kmsKeyName</code>' attribute.
     *
     * @param[in] value Resource name of the Cloud KMS key, of the form projects
     * /my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will
     * be used to encrypt the object. Overrides the object metadata's
     * kms_key_name value, if any.
     */
    void set_kms_key_name(const string& value) {
      _have_kms_key_name_ = true;
      kms_key_name_ = value;
    }



    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Object* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

  /**
   * Determine if the request should use Media Download for the response.
   *
   * @return true for media download, false otherwise.
   */
  bool get_use_media_download() const   {
    return StorageServiceBaseRequest::get_use_media_download();
  }

  /**
   * Sets whether Media Download should be used for the response data.
   *
   * @param[in] use true to use media download, false otherwise.
   */
  void set_use_media_download(bool use) {
    StorageServiceBaseRequest::set_use_media_download(use);
  }

 private:
  string destination_bucket_;
  string destination_object_;
  string destination_predefined_acl_;
  int64 if_generation_match_;
  int64 if_metageneration_match_;
  string kms_key_name_;
  string user_project_;
  bool _have_destination_predefined_acl_ : 1;
  bool _have_if_generation_match_ : 1;
  bool _have_if_metageneration_match_ : 1;
  bool _have_kms_key_name_ : 1;
  bool _have_user_project_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(ObjectsResource_ComposeMethod);
};

/**
 * Implements the copy method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 * https://www.googleapis.com/auth/devstorage.read_write
 */
class ObjectsResource_CopyMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] source_bucket Name of the bucket in which to find the source
   * object.
   * @param[in] source_object Name of the source object. For information about
   * how to URL encode object names to be path safe, see Encoding URI Path
   * Parts.
   * @param[in] destination_bucket Name of the bucket in which to store the new
   * object. Overrides the provided object metadata's bucket value, if any.For
   * information about how to URL encode object names to be path safe, see
   * Encoding URI Path Parts.
   * @param[in] destination_object Name of the new object. Required when the
   * object metadata is not otherwise provided. Overrides the object metadata's
   * name value, if any.
   * @param[in] _content_ The data object to copy.
   */
  ObjectsResource_CopyMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& source_bucket,
      const StringPiece& source_object,
      const StringPiece& destination_bucket,
      const StringPiece& destination_object,
      const Object& _content_);

  /**
   * Standard destructor.
   */
  virtual ~ObjectsResource_CopyMethod();


    /**
     * Clears the '<code>destinationPredefinedAcl</code>' attribute so it is no
     * longer set.
     */
    void clear_destination_predefined_acl() {
      _have_destination_predefined_acl_ = false;
      client::ClearCppValueHelper(&destination_predefined_acl_);
    }


    /**
     * Gets the optional '<code>destinationPredefinedAcl</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_destination_predefined_acl() const { return destination_predefined_acl_; }

    /**
     * Gets a modifiable pointer to the optional
     * <code>destinationPredefinedAcl</code>' attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_destinationPredefinedAcl() {
      _have_destination_predefined_acl_ = true;
      return &destination_predefined_acl_;
    }


    /**
     * Sets the '<code>destinationPredefinedAcl</code>' attribute.
     *
     * @param[in] value Apply a predefined set of access controls to the
     * destination object.
     */
    void set_destination_predefined_acl(const string& value) {
      _have_destination_predefined_acl_ = true;
      destination_predefined_acl_ = value;
    }



    /**
     * Clears the '<code>ifGenerationMatch</code>' attribute so it is no longer
     * set.
     */
    void clear_if_generation_match() {
      _have_if_generation_match_ = false;
      client::ClearCppValueHelper(&if_generation_match_);
    }


    /**
     * Gets the optional '<code>ifGenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_generation_match() const { return if_generation_match_; }

    /**
     * Sets the '<code>ifGenerationMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the
     * destination object's current generation matches the given value. Setting
     * to 0 makes the operation succeed only if there are no live versions of
     * the object.
     */
    void set_if_generation_match(int64 value) {
      _have_if_generation_match_ = true;
      if_generation_match_ = value;
    }

    /**
     * Clears the '<code>ifGenerationNotMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_generation_not_match() {
      _have_if_generation_not_match_ = false;
      client::ClearCppValueHelper(&if_generation_not_match_);
    }


    /**
     * Gets the optional '<code>ifGenerationNotMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_generation_not_match() const { return if_generation_not_match_; }

    /**
     * Sets the '<code>ifGenerationNotMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the
     * destination object's current generation does not match the given value.
     * If no live object exists, the precondition fails. Setting to 0 makes the
     * operation succeed only if there is a live version of the object.
     */
    void set_if_generation_not_match(int64 value) {
      _have_if_generation_not_match_ = true;
      if_generation_not_match_ = value;
    }

    /**
     * Clears the '<code>ifMetagenerationMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_match() {
      _have_if_metageneration_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_match() const { return if_metageneration_match_; }

    /**
     * Sets the '<code>ifMetagenerationMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the
     * destination object's current metageneration matches the given value.
     */
    void set_if_metageneration_match(int64 value) {
      _have_if_metageneration_match_ = true;
      if_metageneration_match_ = value;
    }

    /**
     * Clears the '<code>ifMetagenerationNotMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_not_match() {
      _have_if_metageneration_not_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_not_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationNotMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_not_match() const { return if_metageneration_not_match_; }

    /**
     * Sets the '<code>ifMetagenerationNotMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the
     * destination object's current metageneration does not match the given
     * value.
     */
    void set_if_metageneration_not_match(int64 value) {
      _have_if_metageneration_not_match_ = true;
      if_metageneration_not_match_ = value;
    }

    /**
     * Clears the '<code>ifSourceGenerationMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_source_generation_match() {
      _have_if_source_generation_match_ = false;
      client::ClearCppValueHelper(&if_source_generation_match_);
    }


    /**
     * Gets the optional '<code>ifSourceGenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_source_generation_match() const { return if_source_generation_match_; }

    /**
     * Sets the '<code>ifSourceGenerationMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the source
     * object's current generation matches the given value.
     */
    void set_if_source_generation_match(int64 value) {
      _have_if_source_generation_match_ = true;
      if_source_generation_match_ = value;
    }

    /**
     * Clears the '<code>ifSourceGenerationNotMatch</code>' attribute so it is
     * no longer set.
     */
    void clear_if_source_generation_not_match() {
      _have_if_source_generation_not_match_ = false;
      client::ClearCppValueHelper(&if_source_generation_not_match_);
    }


    /**
     * Gets the optional '<code>ifSourceGenerationNotMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_source_generation_not_match() const { return if_source_generation_not_match_; }

    /**
     * Sets the '<code>ifSourceGenerationNotMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the source
     * object's current generation does not match the given value.
     */
    void set_if_source_generation_not_match(int64 value) {
      _have_if_source_generation_not_match_ = true;
      if_source_generation_not_match_ = value;
    }

    /**
     * Clears the '<code>ifSourceMetagenerationMatch</code>' attribute so it is
     * no longer set.
     */
    void clear_if_source_metageneration_match() {
      _have_if_source_metageneration_match_ = false;
      client::ClearCppValueHelper(&if_source_metageneration_match_);
    }


    /**
     * Gets the optional '<code>ifSourceMetagenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_source_metageneration_match() const { return if_source_metageneration_match_; }

    /**
     * Sets the '<code>ifSourceMetagenerationMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the source
     * object's current metageneration matches the given value.
     */
    void set_if_source_metageneration_match(int64 value) {
      _have_if_source_metageneration_match_ = true;
      if_source_metageneration_match_ = value;
    }

    /**
     * Clears the '<code>ifSourceMetagenerationNotMatch</code>' attribute so it
     * is no longer set.
     */
    void clear_if_source_metageneration_not_match() {
      _have_if_source_metageneration_not_match_ = false;
      client::ClearCppValueHelper(&if_source_metageneration_not_match_);
    }


    /**
     * Gets the optional '<code>ifSourceMetagenerationNotMatch</code>'
     * attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_source_metageneration_not_match() const { return if_source_metageneration_not_match_; }

    /**
     * Sets the '<code>ifSourceMetagenerationNotMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the source
     * object's current metageneration does not match the given value.
     */
    void set_if_source_metageneration_not_match(int64 value) {
      _have_if_source_metageneration_not_match_ = true;
      if_source_metageneration_not_match_ = value;
    }

    /**
     * Clears the '<code>projection</code>' attribute so it is no longer set.
     */
    void clear_projection() {
      _have_projection_ = false;
      client::ClearCppValueHelper(&projection_);
    }


    /**
     * Gets the optional '<code>projection</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_projection() const { return projection_; }

    /**
     * Gets a modifiable pointer to the optional <code>projection</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_projection() {
      _have_projection_ = true;
      return &projection_;
    }


    /**
     * Sets the '<code>projection</code>' attribute.
     *
     * @param[in] value Set of properties to return. Defaults to noAcl, unless
     * the object resource specifies the acl property, when it defaults to full.
     */
    void set_projection(const string& value) {
      _have_projection_ = true;
      projection_ = value;
    }



    /**
     * Clears the '<code>sourceGeneration</code>' attribute so it is no longer
     * set.
     */
    void clear_source_generation() {
      _have_source_generation_ = false;
      client::ClearCppValueHelper(&source_generation_);
    }


    /**
     * Gets the optional '<code>sourceGeneration</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_source_generation() const { return source_generation_; }

    /**
     * Sets the '<code>sourceGeneration</code>' attribute.
     *
     * @param[in] value If present, selects a specific revision of the source
     * object (as opposed to the latest version, the default).
     */
    void set_source_generation(int64 value) {
      _have_source_generation_ = true;
      source_generation_ = value;
    }

    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Object* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

  /**
   * Determine if the request should use Media Download for the response.
   *
   * @return true for media download, false otherwise.
   */
  bool get_use_media_download() const   {
    return StorageServiceBaseRequest::get_use_media_download();
  }

  /**
   * Sets whether Media Download should be used for the response data.
   *
   * @param[in] use true to use media download, false otherwise.
   */
  void set_use_media_download(bool use) {
    StorageServiceBaseRequest::set_use_media_download(use);
  }

 private:
  string source_bucket_;
  string source_object_;
  string destination_bucket_;
  string destination_object_;
  string destination_predefined_acl_;
  int64 if_generation_match_;
  int64 if_generation_not_match_;
  int64 if_metageneration_match_;
  int64 if_metageneration_not_match_;
  int64 if_source_generation_match_;
  int64 if_source_generation_not_match_;
  int64 if_source_metageneration_match_;
  int64 if_source_metageneration_not_match_;
  string projection_;
  int64 source_generation_;
  string user_project_;
  bool _have_destination_predefined_acl_ : 1;
  bool _have_if_generation_match_ : 1;
  bool _have_if_generation_not_match_ : 1;
  bool _have_if_metageneration_match_ : 1;
  bool _have_if_metageneration_not_match_ : 1;
  bool _have_if_source_generation_match_ : 1;
  bool _have_if_source_generation_not_match_ : 1;
  bool _have_if_source_metageneration_match_ : 1;
  bool _have_if_source_metageneration_not_match_ : 1;
  bool _have_projection_ : 1;
  bool _have_source_generation_ : 1;
  bool _have_user_project_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(ObjectsResource_CopyMethod);
};

/**
 * Implements the delete method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 * https://www.googleapis.com/auth/devstorage.read_write
 */
class ObjectsResource_DeleteMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of the bucket in which the object resides.
   * @param[in] object Name of the object. For information about how to URL
   * encode object names to be path safe, see Encoding URI Path Parts.
   */
  ObjectsResource_DeleteMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const StringPiece& object);

  /**
   * Standard destructor.
   */
  virtual ~ObjectsResource_DeleteMethod();


    /**
     * Clears the '<code>generation</code>' attribute so it is no longer set.
     */
    void clear_generation() {
      _have_generation_ = false;
      client::ClearCppValueHelper(&generation_);
    }


    /**
     * Gets the optional '<code>generation</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_generation() const { return generation_; }

    /**
     * Sets the '<code>generation</code>' attribute.
     *
     * @param[in] value If present, permanently deletes a specific revision of
     * this object (as opposed to the latest version, the default).
     */
    void set_generation(int64 value) {
      _have_generation_ = true;
      generation_ = value;
    }

    /**
     * Clears the '<code>ifGenerationMatch</code>' attribute so it is no longer
     * set.
     */
    void clear_if_generation_match() {
      _have_if_generation_match_ = false;
      client::ClearCppValueHelper(&if_generation_match_);
    }


    /**
     * Gets the optional '<code>ifGenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_generation_match() const { return if_generation_match_; }

    /**
     * Sets the '<code>ifGenerationMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the object's
     * current generation matches the given value. Setting to 0 makes the
     * operation succeed only if there are no live versions of the object.
     */
    void set_if_generation_match(int64 value) {
      _have_if_generation_match_ = true;
      if_generation_match_ = value;
    }

    /**
     * Clears the '<code>ifGenerationNotMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_generation_not_match() {
      _have_if_generation_not_match_ = false;
      client::ClearCppValueHelper(&if_generation_not_match_);
    }


    /**
     * Gets the optional '<code>ifGenerationNotMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_generation_not_match() const { return if_generation_not_match_; }

    /**
     * Sets the '<code>ifGenerationNotMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the object's
     * current generation does not match the given value. If no live object
     * exists, the precondition fails. Setting to 0 makes the operation succeed
     * only if there is a live version of the object.
     */
    void set_if_generation_not_match(int64 value) {
      _have_if_generation_not_match_ = true;
      if_generation_not_match_ = value;
    }

    /**
     * Clears the '<code>ifMetagenerationMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_match() {
      _have_if_metageneration_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_match() const { return if_metageneration_match_; }

    /**
     * Sets the '<code>ifMetagenerationMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the object's
     * current metageneration matches the given value.
     */
    void set_if_metageneration_match(int64 value) {
      _have_if_metageneration_match_ = true;
      if_metageneration_match_ = value;
    }

    /**
     * Clears the '<code>ifMetagenerationNotMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_not_match() {
      _have_if_metageneration_not_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_not_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationNotMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_not_match() const { return if_metageneration_not_match_; }

    /**
     * Sets the '<code>ifMetagenerationNotMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the object's
     * current metageneration does not match the given value.
     */
    void set_if_metageneration_not_match(int64 value) {
      _have_if_metageneration_not_match_ = true;
      if_metageneration_not_match_ = value;
    }

    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


 private:
  string bucket_;
  string object_;
  int64 generation_;
  int64 if_generation_match_;
  int64 if_generation_not_match_;
  int64 if_metageneration_match_;
  int64 if_metageneration_not_match_;
  string user_project_;
  bool _have_generation_ : 1;
  bool _have_if_generation_match_ : 1;
  bool _have_if_generation_not_match_ : 1;
  bool _have_if_metageneration_match_ : 1;
  bool _have_if_metageneration_not_match_ : 1;
  bool _have_user_project_ : 1;
  DISALLOW_COPY_AND_ASSIGN(ObjectsResource_DeleteMethod);
};

/**
 * Implements the get method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/cloud-platform.read-only
 * https://www.googleapis.com/auth/devstorage.full_control
 * https://www.googleapis.com/auth/devstorage.read_only
 * https://www.googleapis.com/auth/devstorage.read_write
 */
class ObjectsResource_GetMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of the bucket in which the object resides.
   * @param[in] object Name of the object. For information about how to URL
   * encode object names to be path safe, see Encoding URI Path Parts.
   */
  ObjectsResource_GetMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const StringPiece& object);

  /**
   * Standard destructor.
   */
  virtual ~ObjectsResource_GetMethod();


    /**
     * Clears the '<code>generation</code>' attribute so it is no longer set.
     */
    void clear_generation() {
      _have_generation_ = false;
      client::ClearCppValueHelper(&generation_);
    }


    /**
     * Gets the optional '<code>generation</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_generation() const { return generation_; }

    /**
     * Sets the '<code>generation</code>' attribute.
     *
     * @param[in] value If present, selects a specific revision of this object
     * (as opposed to the latest version, the default).
     */
    void set_generation(int64 value) {
      _have_generation_ = true;
      generation_ = value;
    }

    /**
     * Clears the '<code>ifGenerationMatch</code>' attribute so it is no longer
     * set.
     */
    void clear_if_generation_match() {
      _have_if_generation_match_ = false;
      client::ClearCppValueHelper(&if_generation_match_);
    }


    /**
     * Gets the optional '<code>ifGenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_generation_match() const { return if_generation_match_; }

    /**
     * Sets the '<code>ifGenerationMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the object's
     * current generation matches the given value. Setting to 0 makes the
     * operation succeed only if there are no live versions of the object.
     */
    void set_if_generation_match(int64 value) {
      _have_if_generation_match_ = true;
      if_generation_match_ = value;
    }

    /**
     * Clears the '<code>ifGenerationNotMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_generation_not_match() {
      _have_if_generation_not_match_ = false;
      client::ClearCppValueHelper(&if_generation_not_match_);
    }


    /**
     * Gets the optional '<code>ifGenerationNotMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_generation_not_match() const { return if_generation_not_match_; }

    /**
     * Sets the '<code>ifGenerationNotMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the object's
     * current generation does not match the given value. If no live object
     * exists, the precondition fails. Setting to 0 makes the operation succeed
     * only if there is a live version of the object.
     */
    void set_if_generation_not_match(int64 value) {
      _have_if_generation_not_match_ = true;
      if_generation_not_match_ = value;
    }

    /**
     * Clears the '<code>ifMetagenerationMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_match() {
      _have_if_metageneration_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_match() const { return if_metageneration_match_; }

    /**
     * Sets the '<code>ifMetagenerationMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the object's
     * current metageneration matches the given value.
     */
    void set_if_metageneration_match(int64 value) {
      _have_if_metageneration_match_ = true;
      if_metageneration_match_ = value;
    }

    /**
     * Clears the '<code>ifMetagenerationNotMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_not_match() {
      _have_if_metageneration_not_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_not_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationNotMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_not_match() const { return if_metageneration_not_match_; }

    /**
     * Sets the '<code>ifMetagenerationNotMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the object's
     * current metageneration does not match the given value.
     */
    void set_if_metageneration_not_match(int64 value) {
      _have_if_metageneration_not_match_ = true;
      if_metageneration_not_match_ = value;
    }

    /**
     * Clears the '<code>projection</code>' attribute so it is no longer set.
     */
    void clear_projection() {
      _have_projection_ = false;
      client::ClearCppValueHelper(&projection_);
    }


    /**
     * Gets the optional '<code>projection</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_projection() const { return projection_; }

    /**
     * Gets a modifiable pointer to the optional <code>projection</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_projection() {
      _have_projection_ = true;
      return &projection_;
    }


    /**
     * Sets the '<code>projection</code>' attribute.
     *
     * @param[in] value Set of properties to return. Defaults to noAcl.
     */
    void set_projection(const string& value) {
      _have_projection_ = true;
      projection_ = value;
    }



    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Object* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

  /**
   * Determine if the request should use Media Download for the response.
   *
   * @return true for media download, false otherwise.
   */
  bool get_use_media_download() const   {
    return StorageServiceBaseRequest::get_use_media_download();
  }

  /**
   * Sets whether Media Download should be used for the response data.
   *
   * @param[in] use true to use media download, false otherwise.
   */
  void set_use_media_download(bool use) {
    StorageServiceBaseRequest::set_use_media_download(use);
  }

 private:
  string bucket_;
  string object_;
  int64 generation_;
  int64 if_generation_match_;
  int64 if_generation_not_match_;
  int64 if_metageneration_match_;
  int64 if_metageneration_not_match_;
  string projection_;
  string user_project_;
  bool _have_generation_ : 1;
  bool _have_if_generation_match_ : 1;
  bool _have_if_generation_not_match_ : 1;
  bool _have_if_metageneration_match_ : 1;
  bool _have_if_metageneration_not_match_ : 1;
  bool _have_projection_ : 1;
  bool _have_user_project_ : 1;
  DISALLOW_COPY_AND_ASSIGN(ObjectsResource_GetMethod);
};

/**
 * Implements the getIamPolicy method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/cloud-platform.read-only
 * https://www.googleapis.com/auth/devstorage.full_control
 * https://www.googleapis.com/auth/devstorage.read_only
 * https://www.googleapis.com/auth/devstorage.read_write
 */
class ObjectsResource_GetIamPolicyMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of the bucket in which the object resides.
   * @param[in] object Name of the object. For information about how to URL
   * encode object names to be path safe, see Encoding URI Path Parts.
   */
  ObjectsResource_GetIamPolicyMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const StringPiece& object);

  /**
   * Standard destructor.
   */
  virtual ~ObjectsResource_GetIamPolicyMethod();


    /**
     * Clears the '<code>generation</code>' attribute so it is no longer set.
     */
    void clear_generation() {
      _have_generation_ = false;
      client::ClearCppValueHelper(&generation_);
    }


    /**
     * Gets the optional '<code>generation</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_generation() const { return generation_; }

    /**
     * Sets the '<code>generation</code>' attribute.
     *
     * @param[in] value If present, selects a specific revision of this object
     * (as opposed to the latest version, the default).
     */
    void set_generation(int64 value) {
      _have_generation_ = true;
      generation_ = value;
    }

    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Policy* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string object_;
  int64 generation_;
  string user_project_;
  bool _have_generation_ : 1;
  bool _have_user_project_ : 1;
  DISALLOW_COPY_AND_ASSIGN(ObjectsResource_GetIamPolicyMethod);
};

/**
 * Implements the insert method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 * https://www.googleapis.com/auth/devstorage.read_write
 */
class ObjectsResource_InsertMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   *
   * @deprecated in favor constructor that includes the media upload parameters.
   *
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of the bucket in which to store the new object.
   * Overrides the provided object metadata's bucket value, if any.
   *
   * @param[in] _content_ The data object to insert.
   */
  ObjectsResource_InsertMethod(
        const StorageService* _service_,
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket);
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of the bucket in which to store the new object.
   * Overrides the provided object metadata's bucket value, if any.
   * @param[in] _metadata_ The metadata object to insert. If this
   *            is NULL then do not upload any metadata.
   * @param[in] _media_content_type_ The content type of the data in the
   *            _media_content_reader_.
   * @param[in] _media_content_reader_ The media content to insert. If
   *            this is NULL then do not upload any media and ignore
   *            _media_content_type_.
   */
  ObjectsResource_InsertMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const Object* _metadata_,
      const char* _media_content_type_,
      client::DataReader* _media_content_reader_);

  /**
   * Standard destructor.
   */
  virtual ~ObjectsResource_InsertMethod();


    /**
     * Clears the '<code>contentEncoding</code>' attribute so it is no longer
     * set.
     */
    void clear_content_encoding() {
      _have_content_encoding_ = false;
      client::ClearCppValueHelper(&content_encoding_);
    }


    /**
     * Gets the optional '<code>contentEncoding</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_content_encoding() const { return content_encoding_; }

    /**
     * Gets a modifiable pointer to the optional <code>contentEncoding</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_contentEncoding() {
      _have_content_encoding_ = true;
      return &content_encoding_;
    }


    /**
     * Sets the '<code>contentEncoding</code>' attribute.
     *
     * @param[in] value If set, sets the contentEncoding property of the final
     * object to this value. Setting this parameter is equivalent to setting the
     * contentEncoding metadata property. This can be useful when uploading an
     * object with uploadType=media to indicate the encoding of the content
     * being uploaded.
     */
    void set_content_encoding(const string& value) {
      _have_content_encoding_ = true;
      content_encoding_ = value;
    }



    /**
     * Clears the '<code>ifGenerationMatch</code>' attribute so it is no longer
     * set.
     */
    void clear_if_generation_match() {
      _have_if_generation_match_ = false;
      client::ClearCppValueHelper(&if_generation_match_);
    }


    /**
     * Gets the optional '<code>ifGenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_generation_match() const { return if_generation_match_; }

    /**
     * Sets the '<code>ifGenerationMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the object's
     * current generation matches the given value. Setting to 0 makes the
     * operation succeed only if there are no live versions of the object.
     */
    void set_if_generation_match(int64 value) {
      _have_if_generation_match_ = true;
      if_generation_match_ = value;
    }

    /**
     * Clears the '<code>ifGenerationNotMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_generation_not_match() {
      _have_if_generation_not_match_ = false;
      client::ClearCppValueHelper(&if_generation_not_match_);
    }


    /**
     * Gets the optional '<code>ifGenerationNotMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_generation_not_match() const { return if_generation_not_match_; }

    /**
     * Sets the '<code>ifGenerationNotMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the object's
     * current generation does not match the given value. If no live object
     * exists, the precondition fails. Setting to 0 makes the operation succeed
     * only if there is a live version of the object.
     */
    void set_if_generation_not_match(int64 value) {
      _have_if_generation_not_match_ = true;
      if_generation_not_match_ = value;
    }

    /**
     * Clears the '<code>ifMetagenerationMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_match() {
      _have_if_metageneration_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_match() const { return if_metageneration_match_; }

    /**
     * Sets the '<code>ifMetagenerationMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the object's
     * current metageneration matches the given value.
     */
    void set_if_metageneration_match(int64 value) {
      _have_if_metageneration_match_ = true;
      if_metageneration_match_ = value;
    }

    /**
     * Clears the '<code>ifMetagenerationNotMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_not_match() {
      _have_if_metageneration_not_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_not_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationNotMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_not_match() const { return if_metageneration_not_match_; }

    /**
     * Sets the '<code>ifMetagenerationNotMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the object's
     * current metageneration does not match the given value.
     */
    void set_if_metageneration_not_match(int64 value) {
      _have_if_metageneration_not_match_ = true;
      if_metageneration_not_match_ = value;
    }

    /**
     * Clears the '<code>kmsKeyName</code>' attribute so it is no longer set.
     */
    void clear_kms_key_name() {
      _have_kms_key_name_ = false;
      client::ClearCppValueHelper(&kms_key_name_);
    }


    /**
     * Gets the optional '<code>kmsKeyName</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_kms_key_name() const { return kms_key_name_; }

    /**
     * Gets a modifiable pointer to the optional <code>kmsKeyName</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_kmsKeyName() {
      _have_kms_key_name_ = true;
      return &kms_key_name_;
    }


    /**
     * Sets the '<code>kmsKeyName</code>' attribute.
     *
     * @param[in] value Resource name of the Cloud KMS key, of the form projects
     * /my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will
     * be used to encrypt the object. Overrides the object metadata's
     * kms_key_name value, if any.
     */
    void set_kms_key_name(const string& value) {
      _have_kms_key_name_ = true;
      kms_key_name_ = value;
    }



    /**
     * Clears the '<code>name</code>' attribute so it is no longer set.
     */
    void clear_name() {
      _have_name_ = false;
      client::ClearCppValueHelper(&name_);
    }


    /**
     * Gets the optional '<code>name</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_name() const { return name_; }

    /**
     * Gets a modifiable pointer to the optional <code>name</code>' attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_name() {
      _have_name_ = true;
      return &name_;
    }


    /**
     * Sets the '<code>name</code>' attribute.
     *
     * @param[in] value Name of the object. Required when the object metadata is
     * not otherwise provided. Overrides the object metadata's name value, if
     * any. For information about how to URL encode object names to be path
     * safe, see Encoding URI Path Parts.
     */
    void set_name(const string& value) {
      _have_name_ = true;
      name_ = value;
    }



    /**
     * Clears the '<code>predefinedAcl</code>' attribute so it is no longer set.
     */
    void clear_predefined_acl() {
      _have_predefined_acl_ = false;
      client::ClearCppValueHelper(&predefined_acl_);
    }


    /**
     * Gets the optional '<code>predefinedAcl</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_predefined_acl() const { return predefined_acl_; }

    /**
     * Gets a modifiable pointer to the optional <code>predefinedAcl</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_predefinedAcl() {
      _have_predefined_acl_ = true;
      return &predefined_acl_;
    }


    /**
     * Sets the '<code>predefinedAcl</code>' attribute.
     *
     * @param[in] value Apply a predefined set of access controls to this
     * object.
     */
    void set_predefined_acl(const string& value) {
      _have_predefined_acl_ = true;
      predefined_acl_ = value;
    }



    /**
     * Clears the '<code>projection</code>' attribute so it is no longer set.
     */
    void clear_projection() {
      _have_projection_ = false;
      client::ClearCppValueHelper(&projection_);
    }


    /**
     * Gets the optional '<code>projection</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_projection() const { return projection_; }

    /**
     * Gets a modifiable pointer to the optional <code>projection</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_projection() {
      _have_projection_ = true;
      return &projection_;
    }


    /**
     * Sets the '<code>projection</code>' attribute.
     *
     * @param[in] value Set of properties to return. Defaults to noAcl, unless
     * the object resource specifies the acl property, when it defaults to full.
     */
    void set_projection(const string& value) {
      _have_projection_ = true;
      projection_ = value;
    }



    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Object* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }


  /**
   * Returns MediaUploader for uploading the content.
   */

  /**
   * Returns the specification for media upload using the simple protocol.
   */
  static const client::MediaUploadSpec SIMPLE_MEDIA_UPLOAD;
  /**
   * Returns the specification for media upload using the resumable protocol.
   */
  static const client::MediaUploadSpec RESUMABLE_MEDIA_UPLOAD;

  /**
   * Determine if the request should use Media Download for the response.
   *
   * @return true for media download, false otherwise.
   */
  bool get_use_media_download() const   {
    return StorageServiceBaseRequest::get_use_media_download();
  }

  /**
   * Sets whether Media Download should be used for the response data.
   *
   * @param[in] use true to use media download, false otherwise.
   */
  void set_use_media_download(bool use) {
    StorageServiceBaseRequest::set_use_media_download(use);
  }

 private:
  string bucket_;
  string content_encoding_;
  int64 if_generation_match_;
  int64 if_generation_not_match_;
  int64 if_metageneration_match_;
  int64 if_metageneration_not_match_;
  string kms_key_name_;
  string name_;
  string predefined_acl_;
  string projection_;
  string user_project_;
  bool _have_content_encoding_ : 1;
  bool _have_if_generation_match_ : 1;
  bool _have_if_generation_not_match_ : 1;
  bool _have_if_metageneration_match_ : 1;
  bool _have_if_metageneration_not_match_ : 1;
  bool _have_kms_key_name_ : 1;
  bool _have_name_ : 1;
  bool _have_predefined_acl_ : 1;
  bool _have_projection_ : 1;
  bool _have_user_project_ : 1;
  DISALLOW_COPY_AND_ASSIGN(ObjectsResource_InsertMethod);
};

/**
 * Implements the list method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/cloud-platform.read-only
 * https://www.googleapis.com/auth/devstorage.full_control
 * https://www.googleapis.com/auth/devstorage.read_only
 * https://www.googleapis.com/auth/devstorage.read_write
 */
class ObjectsResource_ListMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of the bucket in which to look for objects.
   */
  ObjectsResource_ListMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket);

  /**
   * Standard destructor.
   */
  virtual ~ObjectsResource_ListMethod();


    /**
     * Clears the '<code>delimiter</code>' attribute so it is no longer set.
     */
    void clear_delimiter() {
      _have_delimiter_ = false;
      client::ClearCppValueHelper(&delimiter_);
    }


    /**
     * Gets the optional '<code>delimiter</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_delimiter() const { return delimiter_; }

    /**
     * Gets a modifiable pointer to the optional <code>delimiter</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_delimiter() {
      _have_delimiter_ = true;
      return &delimiter_;
    }


    /**
     * Sets the '<code>delimiter</code>' attribute.
     *
     * @param[in] value Returns results in a directory-like mode. items will
     * contain only objects whose names, aside from the prefix, do not contain
     * delimiter. Objects whose names, aside from the prefix, contain delimiter
     * will have their name, truncated after the delimiter, returned in
     * prefixes. Duplicate prefixes are omitted.
     */
    void set_delimiter(const string& value) {
      _have_delimiter_ = true;
      delimiter_ = value;
    }



    /**
     * Clears the '<code>maxResults</code>' attribute so it is no longer set.
     */
    void clear_max_results() {
      _have_max_results_ = false;
      client::ClearCppValueHelper(&max_results_);
    }


    /**
     * Gets the optional '<code>maxResults</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    uint32 get_max_results() const { return max_results_; }

    /**
     * Sets the '<code>maxResults</code>' attribute.
     *
     * @param[in] value Maximum number of items plus prefixes to return in a
     * single page of responses. As duplicate prefixes are omitted, fewer total
     * results may be returned than requested. The service will use this
     * parameter or 1,000 items, whichever is smaller.
     */
    void set_max_results(uint32 value) {
      _have_max_results_ = true;
      max_results_ = value;
    }

    /**
     * Clears the '<code>pageToken</code>' attribute so it is no longer set.
     */
    void clear_page_token() {
      _have_page_token_ = false;
      client::ClearCppValueHelper(&page_token_);
    }


    /**
     * Gets the optional '<code>pageToken</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_page_token() const { return page_token_; }

    /**
     * Gets a modifiable pointer to the optional <code>pageToken</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_pageToken() {
      _have_page_token_ = true;
      return &page_token_;
    }


    /**
     * Sets the '<code>pageToken</code>' attribute.
     *
     * @param[in] value A previously-returned page token representing part of
     * the larger set of results to view.
     */
    void set_page_token(const string& value) {
      _have_page_token_ = true;
      page_token_ = value;
    }



    /**
     * Clears the '<code>prefix</code>' attribute so it is no longer set.
     */
    void clear_prefix() {
      _have_prefix_ = false;
      client::ClearCppValueHelper(&prefix_);
    }


    /**
     * Gets the optional '<code>prefix</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_prefix() const { return prefix_; }

    /**
     * Gets a modifiable pointer to the optional <code>prefix</code>' attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_prefix() {
      _have_prefix_ = true;
      return &prefix_;
    }


    /**
     * Sets the '<code>prefix</code>' attribute.
     *
     * @param[in] value Filter results to objects whose names begin with this
     * prefix.
     */
    void set_prefix(const string& value) {
      _have_prefix_ = true;
      prefix_ = value;
    }



    /**
     * Clears the '<code>projection</code>' attribute so it is no longer set.
     */
    void clear_projection() {
      _have_projection_ = false;
      client::ClearCppValueHelper(&projection_);
    }


    /**
     * Gets the optional '<code>projection</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_projection() const { return projection_; }

    /**
     * Gets a modifiable pointer to the optional <code>projection</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_projection() {
      _have_projection_ = true;
      return &projection_;
    }


    /**
     * Sets the '<code>projection</code>' attribute.
     *
     * @param[in] value Set of properties to return. Defaults to noAcl.
     */
    void set_projection(const string& value) {
      _have_projection_ = true;
      projection_ = value;
    }



    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }



    /**
     * Clears the '<code>versions</code>' attribute so it is no longer set.
     */
    void clear_versions() {
      _have_versions_ = false;
      client::ClearCppValueHelper(&versions_);
    }


    /**
     * Gets the optional '<code>versions</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_versions() const { return versions_; }

    /**
     * Sets the '<code>versions</code>' attribute.
     *
     * @param[in] value If true, lists all versions of an object as distinct
     * results. The default is false. For more information, see Object
     * Versioning.
     */
    void set_versions(bool value) {
      _have_versions_ = true;
      versions_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Objects* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string delimiter_;
  uint32 max_results_;
  string page_token_;
  string prefix_;
  string projection_;
  string user_project_;
  bool versions_;
  bool _have_delimiter_ : 1;
  bool _have_max_results_ : 1;
  bool _have_page_token_ : 1;
  bool _have_prefix_ : 1;
  bool _have_projection_ : 1;
  bool _have_user_project_ : 1;
  bool _have_versions_ : 1;
  DISALLOW_COPY_AND_ASSIGN(ObjectsResource_ListMethod);
};

typedef client::ServiceRequestPager<
            ObjectsResource_ListMethod,
            Objects>
        ObjectsResource_ListMethodPager;

/**
 * Implements the patch method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 */
class ObjectsResource_PatchMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of the bucket in which the object resides.
   * @param[in] object Name of the object. For information about how to URL
   * encode object names to be path safe, see Encoding URI Path Parts.
   * @param[in] _content_ The data object to patch.
   */
  ObjectsResource_PatchMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const StringPiece& object,
      const Object& _content_);

  /**
   * Standard destructor.
   */
  virtual ~ObjectsResource_PatchMethod();


    /**
     * Clears the '<code>generation</code>' attribute so it is no longer set.
     */
    void clear_generation() {
      _have_generation_ = false;
      client::ClearCppValueHelper(&generation_);
    }


    /**
     * Gets the optional '<code>generation</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_generation() const { return generation_; }

    /**
     * Sets the '<code>generation</code>' attribute.
     *
     * @param[in] value If present, selects a specific revision of this object
     * (as opposed to the latest version, the default).
     */
    void set_generation(int64 value) {
      _have_generation_ = true;
      generation_ = value;
    }

    /**
     * Clears the '<code>ifGenerationMatch</code>' attribute so it is no longer
     * set.
     */
    void clear_if_generation_match() {
      _have_if_generation_match_ = false;
      client::ClearCppValueHelper(&if_generation_match_);
    }


    /**
     * Gets the optional '<code>ifGenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_generation_match() const { return if_generation_match_; }

    /**
     * Sets the '<code>ifGenerationMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the object's
     * current generation matches the given value. Setting to 0 makes the
     * operation succeed only if there are no live versions of the object.
     */
    void set_if_generation_match(int64 value) {
      _have_if_generation_match_ = true;
      if_generation_match_ = value;
    }

    /**
     * Clears the '<code>ifGenerationNotMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_generation_not_match() {
      _have_if_generation_not_match_ = false;
      client::ClearCppValueHelper(&if_generation_not_match_);
    }


    /**
     * Gets the optional '<code>ifGenerationNotMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_generation_not_match() const { return if_generation_not_match_; }

    /**
     * Sets the '<code>ifGenerationNotMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the object's
     * current generation does not match the given value. If no live object
     * exists, the precondition fails. Setting to 0 makes the operation succeed
     * only if there is a live version of the object.
     */
    void set_if_generation_not_match(int64 value) {
      _have_if_generation_not_match_ = true;
      if_generation_not_match_ = value;
    }

    /**
     * Clears the '<code>ifMetagenerationMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_match() {
      _have_if_metageneration_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_match() const { return if_metageneration_match_; }

    /**
     * Sets the '<code>ifMetagenerationMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the object's
     * current metageneration matches the given value.
     */
    void set_if_metageneration_match(int64 value) {
      _have_if_metageneration_match_ = true;
      if_metageneration_match_ = value;
    }

    /**
     * Clears the '<code>ifMetagenerationNotMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_not_match() {
      _have_if_metageneration_not_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_not_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationNotMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_not_match() const { return if_metageneration_not_match_; }

    /**
     * Sets the '<code>ifMetagenerationNotMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the object's
     * current metageneration does not match the given value.
     */
    void set_if_metageneration_not_match(int64 value) {
      _have_if_metageneration_not_match_ = true;
      if_metageneration_not_match_ = value;
    }

    /**
     * Clears the '<code>predefinedAcl</code>' attribute so it is no longer set.
     */
    void clear_predefined_acl() {
      _have_predefined_acl_ = false;
      client::ClearCppValueHelper(&predefined_acl_);
    }


    /**
     * Gets the optional '<code>predefinedAcl</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_predefined_acl() const { return predefined_acl_; }

    /**
     * Gets a modifiable pointer to the optional <code>predefinedAcl</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_predefinedAcl() {
      _have_predefined_acl_ = true;
      return &predefined_acl_;
    }


    /**
     * Sets the '<code>predefinedAcl</code>' attribute.
     *
     * @param[in] value Apply a predefined set of access controls to this
     * object.
     */
    void set_predefined_acl(const string& value) {
      _have_predefined_acl_ = true;
      predefined_acl_ = value;
    }



    /**
     * Clears the '<code>projection</code>' attribute so it is no longer set.
     */
    void clear_projection() {
      _have_projection_ = false;
      client::ClearCppValueHelper(&projection_);
    }


    /**
     * Gets the optional '<code>projection</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_projection() const { return projection_; }

    /**
     * Gets a modifiable pointer to the optional <code>projection</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_projection() {
      _have_projection_ = true;
      return &projection_;
    }


    /**
     * Sets the '<code>projection</code>' attribute.
     *
     * @param[in] value Set of properties to return. Defaults to full.
     */
    void set_projection(const string& value) {
      _have_projection_ = true;
      projection_ = value;
    }



    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Object* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string object_;
  int64 generation_;
  int64 if_generation_match_;
  int64 if_generation_not_match_;
  int64 if_metageneration_match_;
  int64 if_metageneration_not_match_;
  string predefined_acl_;
  string projection_;
  string user_project_;
  bool _have_generation_ : 1;
  bool _have_if_generation_match_ : 1;
  bool _have_if_generation_not_match_ : 1;
  bool _have_if_metageneration_match_ : 1;
  bool _have_if_metageneration_not_match_ : 1;
  bool _have_predefined_acl_ : 1;
  bool _have_projection_ : 1;
  bool _have_user_project_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(ObjectsResource_PatchMethod);
};

/**
 * Implements the rewrite method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 * https://www.googleapis.com/auth/devstorage.read_write
 */
class ObjectsResource_RewriteMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] source_bucket Name of the bucket in which to find the source
   * object.
   * @param[in] source_object Name of the source object. For information about
   * how to URL encode object names to be path safe, see Encoding URI Path
   * Parts.
   * @param[in] destination_bucket Name of the bucket in which to store the new
   * object. Overrides the provided object metadata's bucket value, if any.
   * @param[in] destination_object Name of the new object. Required when the
   * object metadata is not otherwise provided. Overrides the object metadata's
   * name value, if any. For information about how to URL encode object names to
   * be path safe, see Encoding URI Path Parts.
   * @param[in] _content_ The data object to rewrite.
   */
  ObjectsResource_RewriteMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& source_bucket,
      const StringPiece& source_object,
      const StringPiece& destination_bucket,
      const StringPiece& destination_object,
      const Object& _content_);

  /**
   * Standard destructor.
   */
  virtual ~ObjectsResource_RewriteMethod();


    /**
     * Clears the '<code>destinationKmsKeyName</code>' attribute so it is no
     * longer set.
     */
    void clear_destination_kms_key_name() {
      _have_destination_kms_key_name_ = false;
      client::ClearCppValueHelper(&destination_kms_key_name_);
    }


    /**
     * Gets the optional '<code>destinationKmsKeyName</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_destination_kms_key_name() const { return destination_kms_key_name_; }

    /**
     * Gets a modifiable pointer to the optional
     * <code>destinationKmsKeyName</code>' attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_destinationKmsKeyName() {
      _have_destination_kms_key_name_ = true;
      return &destination_kms_key_name_;
    }


    /**
     * Sets the '<code>destinationKmsKeyName</code>' attribute.
     *
     * @param[in] value Resource name of the Cloud KMS key, of the form projects
     * /my-project/locations/global/keyRings/my-kr/cryptoKeys/my-key, that will
     * be used to encrypt the object. Overrides the object metadata's
     * kms_key_name value, if any.
     */
    void set_destination_kms_key_name(const string& value) {
      _have_destination_kms_key_name_ = true;
      destination_kms_key_name_ = value;
    }



    /**
     * Clears the '<code>destinationPredefinedAcl</code>' attribute so it is no
     * longer set.
     */
    void clear_destination_predefined_acl() {
      _have_destination_predefined_acl_ = false;
      client::ClearCppValueHelper(&destination_predefined_acl_);
    }


    /**
     * Gets the optional '<code>destinationPredefinedAcl</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_destination_predefined_acl() const { return destination_predefined_acl_; }

    /**
     * Gets a modifiable pointer to the optional
     * <code>destinationPredefinedAcl</code>' attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_destinationPredefinedAcl() {
      _have_destination_predefined_acl_ = true;
      return &destination_predefined_acl_;
    }


    /**
     * Sets the '<code>destinationPredefinedAcl</code>' attribute.
     *
     * @param[in] value Apply a predefined set of access controls to the
     * destination object.
     */
    void set_destination_predefined_acl(const string& value) {
      _have_destination_predefined_acl_ = true;
      destination_predefined_acl_ = value;
    }



    /**
     * Clears the '<code>ifGenerationMatch</code>' attribute so it is no longer
     * set.
     */
    void clear_if_generation_match() {
      _have_if_generation_match_ = false;
      client::ClearCppValueHelper(&if_generation_match_);
    }


    /**
     * Gets the optional '<code>ifGenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_generation_match() const { return if_generation_match_; }

    /**
     * Sets the '<code>ifGenerationMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the object's
     * current generation matches the given value. Setting to 0 makes the
     * operation succeed only if there are no live versions of the object.
     */
    void set_if_generation_match(int64 value) {
      _have_if_generation_match_ = true;
      if_generation_match_ = value;
    }

    /**
     * Clears the '<code>ifGenerationNotMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_generation_not_match() {
      _have_if_generation_not_match_ = false;
      client::ClearCppValueHelper(&if_generation_not_match_);
    }


    /**
     * Gets the optional '<code>ifGenerationNotMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_generation_not_match() const { return if_generation_not_match_; }

    /**
     * Sets the '<code>ifGenerationNotMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the object's
     * current generation does not match the given value. If no live object
     * exists, the precondition fails. Setting to 0 makes the operation succeed
     * only if there is a live version of the object.
     */
    void set_if_generation_not_match(int64 value) {
      _have_if_generation_not_match_ = true;
      if_generation_not_match_ = value;
    }

    /**
     * Clears the '<code>ifMetagenerationMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_match() {
      _have_if_metageneration_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_match() const { return if_metageneration_match_; }

    /**
     * Sets the '<code>ifMetagenerationMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the
     * destination object's current metageneration matches the given value.
     */
    void set_if_metageneration_match(int64 value) {
      _have_if_metageneration_match_ = true;
      if_metageneration_match_ = value;
    }

    /**
     * Clears the '<code>ifMetagenerationNotMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_not_match() {
      _have_if_metageneration_not_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_not_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationNotMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_not_match() const { return if_metageneration_not_match_; }

    /**
     * Sets the '<code>ifMetagenerationNotMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the
     * destination object's current metageneration does not match the given
     * value.
     */
    void set_if_metageneration_not_match(int64 value) {
      _have_if_metageneration_not_match_ = true;
      if_metageneration_not_match_ = value;
    }

    /**
     * Clears the '<code>ifSourceGenerationMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_source_generation_match() {
      _have_if_source_generation_match_ = false;
      client::ClearCppValueHelper(&if_source_generation_match_);
    }


    /**
     * Gets the optional '<code>ifSourceGenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_source_generation_match() const { return if_source_generation_match_; }

    /**
     * Sets the '<code>ifSourceGenerationMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the source
     * object's current generation matches the given value.
     */
    void set_if_source_generation_match(int64 value) {
      _have_if_source_generation_match_ = true;
      if_source_generation_match_ = value;
    }

    /**
     * Clears the '<code>ifSourceGenerationNotMatch</code>' attribute so it is
     * no longer set.
     */
    void clear_if_source_generation_not_match() {
      _have_if_source_generation_not_match_ = false;
      client::ClearCppValueHelper(&if_source_generation_not_match_);
    }


    /**
     * Gets the optional '<code>ifSourceGenerationNotMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_source_generation_not_match() const { return if_source_generation_not_match_; }

    /**
     * Sets the '<code>ifSourceGenerationNotMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the source
     * object's current generation does not match the given value.
     */
    void set_if_source_generation_not_match(int64 value) {
      _have_if_source_generation_not_match_ = true;
      if_source_generation_not_match_ = value;
    }

    /**
     * Clears the '<code>ifSourceMetagenerationMatch</code>' attribute so it is
     * no longer set.
     */
    void clear_if_source_metageneration_match() {
      _have_if_source_metageneration_match_ = false;
      client::ClearCppValueHelper(&if_source_metageneration_match_);
    }


    /**
     * Gets the optional '<code>ifSourceMetagenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_source_metageneration_match() const { return if_source_metageneration_match_; }

    /**
     * Sets the '<code>ifSourceMetagenerationMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the source
     * object's current metageneration matches the given value.
     */
    void set_if_source_metageneration_match(int64 value) {
      _have_if_source_metageneration_match_ = true;
      if_source_metageneration_match_ = value;
    }

    /**
     * Clears the '<code>ifSourceMetagenerationNotMatch</code>' attribute so it
     * is no longer set.
     */
    void clear_if_source_metageneration_not_match() {
      _have_if_source_metageneration_not_match_ = false;
      client::ClearCppValueHelper(&if_source_metageneration_not_match_);
    }


    /**
     * Gets the optional '<code>ifSourceMetagenerationNotMatch</code>'
     * attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_source_metageneration_not_match() const { return if_source_metageneration_not_match_; }

    /**
     * Sets the '<code>ifSourceMetagenerationNotMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the source
     * object's current metageneration does not match the given value.
     */
    void set_if_source_metageneration_not_match(int64 value) {
      _have_if_source_metageneration_not_match_ = true;
      if_source_metageneration_not_match_ = value;
    }

    /**
     * Clears the '<code>maxBytesRewrittenPerCall</code>' attribute so it is no
     * longer set.
     */
    void clear_max_bytes_rewritten_per_call() {
      _have_max_bytes_rewritten_per_call_ = false;
      client::ClearCppValueHelper(&max_bytes_rewritten_per_call_);
    }


    /**
     * Gets the optional '<code>maxBytesRewrittenPerCall</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_max_bytes_rewritten_per_call() const { return max_bytes_rewritten_per_call_; }

    /**
     * Sets the '<code>maxBytesRewrittenPerCall</code>' attribute.
     *
     * @param[in] value The maximum number of bytes that will be rewritten per
     * rewrite request. Most callers shouldn't need to specify this parameter -
     * it is primarily in place to support testing. If specified the value must
     * be an integral multiple of 1 MiB (1048576). Also, this only applies to
     * requests where the source and destination span locations and/or storage
     * classes. Finally, this value must not change across rewrite calls else
     * you'll get an error that the rewriteToken is invalid.
     */
    void set_max_bytes_rewritten_per_call(int64 value) {
      _have_max_bytes_rewritten_per_call_ = true;
      max_bytes_rewritten_per_call_ = value;
    }

    /**
     * Clears the '<code>projection</code>' attribute so it is no longer set.
     */
    void clear_projection() {
      _have_projection_ = false;
      client::ClearCppValueHelper(&projection_);
    }


    /**
     * Gets the optional '<code>projection</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_projection() const { return projection_; }

    /**
     * Gets a modifiable pointer to the optional <code>projection</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_projection() {
      _have_projection_ = true;
      return &projection_;
    }


    /**
     * Sets the '<code>projection</code>' attribute.
     *
     * @param[in] value Set of properties to return. Defaults to noAcl, unless
     * the object resource specifies the acl property, when it defaults to full.
     */
    void set_projection(const string& value) {
      _have_projection_ = true;
      projection_ = value;
    }



    /**
     * Clears the '<code>rewriteToken</code>' attribute so it is no longer set.
     */
    void clear_rewrite_token() {
      _have_rewrite_token_ = false;
      client::ClearCppValueHelper(&rewrite_token_);
    }


    /**
     * Gets the optional '<code>rewriteToken</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_rewrite_token() const { return rewrite_token_; }

    /**
     * Gets a modifiable pointer to the optional <code>rewriteToken</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_rewriteToken() {
      _have_rewrite_token_ = true;
      return &rewrite_token_;
    }


    /**
     * Sets the '<code>rewriteToken</code>' attribute.
     *
     * @param[in] value Include this field (from the previous rewrite response)
     * on each rewrite request after the first one, until the rewrite response
     * 'done' flag is true. Calls that provide a rewriteToken can omit all other
     * request fields, but if included those fields must match the values
     * provided in the first rewrite request.
     */
    void set_rewrite_token(const string& value) {
      _have_rewrite_token_ = true;
      rewrite_token_ = value;
    }



    /**
     * Clears the '<code>sourceGeneration</code>' attribute so it is no longer
     * set.
     */
    void clear_source_generation() {
      _have_source_generation_ = false;
      client::ClearCppValueHelper(&source_generation_);
    }


    /**
     * Gets the optional '<code>sourceGeneration</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_source_generation() const { return source_generation_; }

    /**
     * Sets the '<code>sourceGeneration</code>' attribute.
     *
     * @param[in] value If present, selects a specific revision of the source
     * object (as opposed to the latest version, the default).
     */
    void set_source_generation(int64 value) {
      _have_source_generation_ = true;
      source_generation_ = value;
    }

    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      RewriteResponse* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string source_bucket_;
  string source_object_;
  string destination_bucket_;
  string destination_object_;
  string destination_kms_key_name_;
  string destination_predefined_acl_;
  int64 if_generation_match_;
  int64 if_generation_not_match_;
  int64 if_metageneration_match_;
  int64 if_metageneration_not_match_;
  int64 if_source_generation_match_;
  int64 if_source_generation_not_match_;
  int64 if_source_metageneration_match_;
  int64 if_source_metageneration_not_match_;
  int64 max_bytes_rewritten_per_call_;
  string projection_;
  string rewrite_token_;
  int64 source_generation_;
  string user_project_;
  bool _have_destination_kms_key_name_ : 1;
  bool _have_destination_predefined_acl_ : 1;
  bool _have_if_generation_match_ : 1;
  bool _have_if_generation_not_match_ : 1;
  bool _have_if_metageneration_match_ : 1;
  bool _have_if_metageneration_not_match_ : 1;
  bool _have_if_source_generation_match_ : 1;
  bool _have_if_source_generation_not_match_ : 1;
  bool _have_if_source_metageneration_match_ : 1;
  bool _have_if_source_metageneration_not_match_ : 1;
  bool _have_max_bytes_rewritten_per_call_ : 1;
  bool _have_projection_ : 1;
  bool _have_rewrite_token_ : 1;
  bool _have_source_generation_ : 1;
  bool _have_user_project_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(ObjectsResource_RewriteMethod);
};

/**
 * Implements the setIamPolicy method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 * https://www.googleapis.com/auth/devstorage.read_write
 */
class ObjectsResource_SetIamPolicyMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of the bucket in which the object resides.
   * @param[in] object Name of the object. For information about how to URL
   * encode object names to be path safe, see Encoding URI Path Parts.
   * @param[in] _content_ The data object to setIamPolicy.
   */
  ObjectsResource_SetIamPolicyMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const StringPiece& object,
      const Policy& _content_);

  /**
   * Standard destructor.
   */
  virtual ~ObjectsResource_SetIamPolicyMethod();


    /**
     * Clears the '<code>generation</code>' attribute so it is no longer set.
     */
    void clear_generation() {
      _have_generation_ = false;
      client::ClearCppValueHelper(&generation_);
    }


    /**
     * Gets the optional '<code>generation</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_generation() const { return generation_; }

    /**
     * Sets the '<code>generation</code>' attribute.
     *
     * @param[in] value If present, selects a specific revision of this object
     * (as opposed to the latest version, the default).
     */
    void set_generation(int64 value) {
      _have_generation_ = true;
      generation_ = value;
    }

    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Policy* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string object_;
  int64 generation_;
  string user_project_;
  bool _have_generation_ : 1;
  bool _have_user_project_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(ObjectsResource_SetIamPolicyMethod);
};

/**
 * Implements the testIamPermissions method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/cloud-platform.read-only
 * https://www.googleapis.com/auth/devstorage.full_control
 * https://www.googleapis.com/auth/devstorage.read_only
 * https://www.googleapis.com/auth/devstorage.read_write
 */
class ObjectsResource_TestIamPermissionsMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of the bucket in which the object resides.
   * @param[in] object Name of the object. For information about how to URL
   * encode object names to be path safe, see Encoding URI Path Parts.
   * @param[in] permissions Permissions to test.
   */
  ObjectsResource_TestIamPermissionsMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const StringPiece& object,
      const client::JsonCppArray<string >& permissions);

  /**
   * Standard destructor.
   */
  virtual ~ObjectsResource_TestIamPermissionsMethod();


    /**
     * Clears the '<code>generation</code>' attribute so it is no longer set.
     */
    void clear_generation() {
      _have_generation_ = false;
      client::ClearCppValueHelper(&generation_);
    }


    /**
     * Gets the optional '<code>generation</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_generation() const { return generation_; }

    /**
     * Sets the '<code>generation</code>' attribute.
     *
     * @param[in] value If present, selects a specific revision of this object
     * (as opposed to the latest version, the default).
     */
    void set_generation(int64 value) {
      _have_generation_ = true;
      generation_ = value;
    }

    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      TestIamPermissionsResponse* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string object_;
  client::JsonCppArray<string > permissions_;
  int64 generation_;
  string user_project_;
  bool _have_generation_ : 1;
  bool _have_user_project_ : 1;
  DISALLOW_COPY_AND_ASSIGN(ObjectsResource_TestIamPermissionsMethod);
};

/**
 * Implements the update method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/devstorage.full_control
 */
class ObjectsResource_UpdateMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of the bucket in which the object resides.
   * @param[in] object Name of the object. For information about how to URL
   * encode object names to be path safe, see Encoding URI Path Parts.
   * @param[in] _content_ The data object to update.
   */
  ObjectsResource_UpdateMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const StringPiece& object,
      const Object& _content_);

  /**
   * Standard destructor.
   */
  virtual ~ObjectsResource_UpdateMethod();


    /**
     * Clears the '<code>generation</code>' attribute so it is no longer set.
     */
    void clear_generation() {
      _have_generation_ = false;
      client::ClearCppValueHelper(&generation_);
    }


    /**
     * Gets the optional '<code>generation</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_generation() const { return generation_; }

    /**
     * Sets the '<code>generation</code>' attribute.
     *
     * @param[in] value If present, selects a specific revision of this object
     * (as opposed to the latest version, the default).
     */
    void set_generation(int64 value) {
      _have_generation_ = true;
      generation_ = value;
    }

    /**
     * Clears the '<code>ifGenerationMatch</code>' attribute so it is no longer
     * set.
     */
    void clear_if_generation_match() {
      _have_if_generation_match_ = false;
      client::ClearCppValueHelper(&if_generation_match_);
    }


    /**
     * Gets the optional '<code>ifGenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_generation_match() const { return if_generation_match_; }

    /**
     * Sets the '<code>ifGenerationMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the object's
     * current generation matches the given value. Setting to 0 makes the
     * operation succeed only if there are no live versions of the object.
     */
    void set_if_generation_match(int64 value) {
      _have_if_generation_match_ = true;
      if_generation_match_ = value;
    }

    /**
     * Clears the '<code>ifGenerationNotMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_generation_not_match() {
      _have_if_generation_not_match_ = false;
      client::ClearCppValueHelper(&if_generation_not_match_);
    }


    /**
     * Gets the optional '<code>ifGenerationNotMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_generation_not_match() const { return if_generation_not_match_; }

    /**
     * Sets the '<code>ifGenerationNotMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the object's
     * current generation does not match the given value. If no live object
     * exists, the precondition fails. Setting to 0 makes the operation succeed
     * only if there is a live version of the object.
     */
    void set_if_generation_not_match(int64 value) {
      _have_if_generation_not_match_ = true;
      if_generation_not_match_ = value;
    }

    /**
     * Clears the '<code>ifMetagenerationMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_match() {
      _have_if_metageneration_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_match() const { return if_metageneration_match_; }

    /**
     * Sets the '<code>ifMetagenerationMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the object's
     * current metageneration matches the given value.
     */
    void set_if_metageneration_match(int64 value) {
      _have_if_metageneration_match_ = true;
      if_metageneration_match_ = value;
    }

    /**
     * Clears the '<code>ifMetagenerationNotMatch</code>' attribute so it is no
     * longer set.
     */
    void clear_if_metageneration_not_match() {
      _have_if_metageneration_not_match_ = false;
      client::ClearCppValueHelper(&if_metageneration_not_match_);
    }


    /**
     * Gets the optional '<code>ifMetagenerationNotMatch</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    int64 get_if_metageneration_not_match() const { return if_metageneration_not_match_; }

    /**
     * Sets the '<code>ifMetagenerationNotMatch</code>' attribute.
     *
     * @param[in] value Makes the operation conditional on whether the object's
     * current metageneration does not match the given value.
     */
    void set_if_metageneration_not_match(int64 value) {
      _have_if_metageneration_not_match_ = true;
      if_metageneration_not_match_ = value;
    }

    /**
     * Clears the '<code>predefinedAcl</code>' attribute so it is no longer set.
     */
    void clear_predefined_acl() {
      _have_predefined_acl_ = false;
      client::ClearCppValueHelper(&predefined_acl_);
    }


    /**
     * Gets the optional '<code>predefinedAcl</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_predefined_acl() const { return predefined_acl_; }

    /**
     * Gets a modifiable pointer to the optional <code>predefinedAcl</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_predefinedAcl() {
      _have_predefined_acl_ = true;
      return &predefined_acl_;
    }


    /**
     * Sets the '<code>predefinedAcl</code>' attribute.
     *
     * @param[in] value Apply a predefined set of access controls to this
     * object.
     */
    void set_predefined_acl(const string& value) {
      _have_predefined_acl_ = true;
      predefined_acl_ = value;
    }



    /**
     * Clears the '<code>projection</code>' attribute so it is no longer set.
     */
    void clear_projection() {
      _have_projection_ = false;
      client::ClearCppValueHelper(&projection_);
    }


    /**
     * Gets the optional '<code>projection</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_projection() const { return projection_; }

    /**
     * Gets a modifiable pointer to the optional <code>projection</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_projection() {
      _have_projection_ = true;
      return &projection_;
    }


    /**
     * Sets the '<code>projection</code>' attribute.
     *
     * @param[in] value Set of properties to return. Defaults to full.
     */
    void set_projection(const string& value) {
      _have_projection_ = true;
      projection_ = value;
    }



    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Object* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

  /**
   * Determine if the request should use Media Download for the response.
   *
   * @return true for media download, false otherwise.
   */
  bool get_use_media_download() const   {
    return StorageServiceBaseRequest::get_use_media_download();
  }

  /**
   * Sets whether Media Download should be used for the response data.
   *
   * @param[in] use true to use media download, false otherwise.
   */
  void set_use_media_download(bool use) {
    StorageServiceBaseRequest::set_use_media_download(use);
  }

 private:
  string bucket_;
  string object_;
  int64 generation_;
  int64 if_generation_match_;
  int64 if_generation_not_match_;
  int64 if_metageneration_match_;
  int64 if_metageneration_not_match_;
  string predefined_acl_;
  string projection_;
  string user_project_;
  bool _have_generation_ : 1;
  bool _have_if_generation_match_ : 1;
  bool _have_if_generation_not_match_ : 1;
  bool _have_if_metageneration_match_ : 1;
  bool _have_if_metageneration_not_match_ : 1;
  bool _have_predefined_acl_ : 1;
  bool _have_projection_ : 1;
  bool _have_user_project_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(ObjectsResource_UpdateMethod);
};

/**
 * Implements the watchAll method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/cloud-platform.read-only
 * https://www.googleapis.com/auth/devstorage.full_control
 * https://www.googleapis.com/auth/devstorage.read_only
 * https://www.googleapis.com/auth/devstorage.read_write
 */
class ObjectsResource_WatchAllMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] bucket Name of the bucket in which to look for objects.
   * @param[in] _content_ The data object to watchAll.
   */
  ObjectsResource_WatchAllMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& bucket,
      const Channel& _content_);

  /**
   * Standard destructor.
   */
  virtual ~ObjectsResource_WatchAllMethod();


    /**
     * Clears the '<code>delimiter</code>' attribute so it is no longer set.
     */
    void clear_delimiter() {
      _have_delimiter_ = false;
      client::ClearCppValueHelper(&delimiter_);
    }


    /**
     * Gets the optional '<code>delimiter</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_delimiter() const { return delimiter_; }

    /**
     * Gets a modifiable pointer to the optional <code>delimiter</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_delimiter() {
      _have_delimiter_ = true;
      return &delimiter_;
    }


    /**
     * Sets the '<code>delimiter</code>' attribute.
     *
     * @param[in] value Returns results in a directory-like mode. items will
     * contain only objects whose names, aside from the prefix, do not contain
     * delimiter. Objects whose names, aside from the prefix, contain delimiter
     * will have their name, truncated after the delimiter, returned in
     * prefixes. Duplicate prefixes are omitted.
     */
    void set_delimiter(const string& value) {
      _have_delimiter_ = true;
      delimiter_ = value;
    }



    /**
     * Clears the '<code>maxResults</code>' attribute so it is no longer set.
     */
    void clear_max_results() {
      _have_max_results_ = false;
      client::ClearCppValueHelper(&max_results_);
    }


    /**
     * Gets the optional '<code>maxResults</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    uint32 get_max_results() const { return max_results_; }

    /**
     * Sets the '<code>maxResults</code>' attribute.
     *
     * @param[in] value Maximum number of items plus prefixes to return in a
     * single page of responses. As duplicate prefixes are omitted, fewer total
     * results may be returned than requested. The service will use this
     * parameter or 1,000 items, whichever is smaller.
     */
    void set_max_results(uint32 value) {
      _have_max_results_ = true;
      max_results_ = value;
    }

    /**
     * Clears the '<code>pageToken</code>' attribute so it is no longer set.
     */
    void clear_page_token() {
      _have_page_token_ = false;
      client::ClearCppValueHelper(&page_token_);
    }


    /**
     * Gets the optional '<code>pageToken</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_page_token() const { return page_token_; }

    /**
     * Gets a modifiable pointer to the optional <code>pageToken</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_pageToken() {
      _have_page_token_ = true;
      return &page_token_;
    }


    /**
     * Sets the '<code>pageToken</code>' attribute.
     *
     * @param[in] value A previously-returned page token representing part of
     * the larger set of results to view.
     */
    void set_page_token(const string& value) {
      _have_page_token_ = true;
      page_token_ = value;
    }



    /**
     * Clears the '<code>prefix</code>' attribute so it is no longer set.
     */
    void clear_prefix() {
      _have_prefix_ = false;
      client::ClearCppValueHelper(&prefix_);
    }


    /**
     * Gets the optional '<code>prefix</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_prefix() const { return prefix_; }

    /**
     * Gets a modifiable pointer to the optional <code>prefix</code>' attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_prefix() {
      _have_prefix_ = true;
      return &prefix_;
    }


    /**
     * Sets the '<code>prefix</code>' attribute.
     *
     * @param[in] value Filter results to objects whose names begin with this
     * prefix.
     */
    void set_prefix(const string& value) {
      _have_prefix_ = true;
      prefix_ = value;
    }



    /**
     * Clears the '<code>projection</code>' attribute so it is no longer set.
     */
    void clear_projection() {
      _have_projection_ = false;
      client::ClearCppValueHelper(&projection_);
    }


    /**
     * Gets the optional '<code>projection</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_projection() const { return projection_; }

    /**
     * Gets a modifiable pointer to the optional <code>projection</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_projection() {
      _have_projection_ = true;
      return &projection_;
    }


    /**
     * Sets the '<code>projection</code>' attribute.
     *
     * @param[in] value Set of properties to return. Defaults to noAcl.
     */
    void set_projection(const string& value) {
      _have_projection_ = true;
      projection_ = value;
    }



    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request. Required for
     * Requester Pays buckets.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }



    /**
     * Clears the '<code>versions</code>' attribute so it is no longer set.
     */
    void clear_versions() {
      _have_versions_ = false;
      client::ClearCppValueHelper(&versions_);
    }


    /**
     * Gets the optional '<code>versions</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    bool get_versions() const { return versions_; }

    /**
     * Sets the '<code>versions</code>' attribute.
     *
     * @param[in] value If true, lists all versions of an object as distinct
     * results. The default is false. For more information, see Object
     * Versioning.
     */
    void set_versions(bool value) {
      _have_versions_ = true;
      versions_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      Channel* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string bucket_;
  string delimiter_;
  uint32 max_results_;
  string page_token_;
  string prefix_;
  string projection_;
  string user_project_;
  bool versions_;
  bool _have_delimiter_ : 1;
  bool _have_max_results_ : 1;
  bool _have_page_token_ : 1;
  bool _have_prefix_ : 1;
  bool _have_projection_ : 1;
  bool _have_user_project_ : 1;
  bool _have_versions_ : 1;  string _content_;
  DISALLOW_COPY_AND_ASSIGN(ObjectsResource_WatchAllMethod);
};






/**
 * Implements the get method.
 *
 * @ingroup ServiceMethod
 *
 * This class uses the Command Pattern. Construct an instance with the required
 * parameters, then set any additional optional parameters by using the
 * attribute setters. To invoke the method, call <code>Execute</code>.
 *
 * One or more of these authorization scopes are required for this method:
 * https://www.googleapis.com/auth/cloud-platform
 * https://www.googleapis.com/auth/cloud-platform.read-only
 * https://www.googleapis.com/auth/devstorage.full_control
 * https://www.googleapis.com/auth/devstorage.read_only
 * https://www.googleapis.com/auth/devstorage.read_write
 */
class ProjectsResource_ServiceAccountResource_GetMethod : public StorageServiceBaseRequest {
 public:
  /**
   * The standard constructor takes all the required method parameters.
   * @param[in] _service_  The service instance to send to when executed.
   * @param[in] _credential_  If not NULL, the credential to authorize with.
   *            In practice this is supplied by the user code that is
   *            creating the method instance.
   * @param[in] project_id Project ID.
   */
  ProjectsResource_ServiceAccountResource_GetMethod(
      const StorageService* _service_,
      client::AuthorizationCredential* _credential_,
      const StringPiece& project_id);

  /**
   * Standard destructor.
   */
  virtual ~ProjectsResource_ServiceAccountResource_GetMethod();


    /**
     * Clears the '<code>userProject</code>' attribute so it is no longer set.
     */
    void clear_user_project() {
      _have_user_project_ = false;
      client::ClearCppValueHelper(&user_project_);
    }


    /**
     * Gets the optional '<code>userProject</code>' attribute.
     *
     * If the value is not set then the default value will be returned.
     */
    const string& get_user_project() const { return user_project_; }

    /**
     * Gets a modifiable pointer to the optional <code>userProject</code>'
     * attribute.
     *
     * @return  The value can be set by dereferencing the pointer.
     */
    string* mutable_userProject() {
      _have_user_project_ = true;
      return &user_project_;
    }


    /**
     * Sets the '<code>userProject</code>' attribute.
     *
     * @param[in] value The project to be billed for this request.
     */
    void set_user_project(const string& value) {
      _have_user_project_ = true;
      user_project_ = value;
    }

  /**
   * Appends variable value to the target string.
   *
   * This is a helper function used to resolve templated variables in the URI.
   *
   * @param[in] variable_name  The name of the templated variable.
   * @param[in] config  A pass-through parameter used for lists and maps.
   * @param[in, out] target The string to append the value to.
   */
  virtual util::Status AppendVariable(
        const string& variable_name,
        const client::UriTemplateConfig& config,
        string* target);

  /**
   * Appends the optional query parameters to the target URL.
   *
   * @param[in, out] target  The URL string to append to.
   */
  virtual util::Status AppendOptionalQueryParameters(string* target);


  /**
   * Executes the method and parses the response into a data object on success.
   *
   * @param[out] data Loads from the response payload JSON data on success.
   *
   * @return Success if an HTTP 2xx response was received. Otherwise the
   *         status indicates the reason for failure. Finer detail may be
   *         available from the underlying http_request to distinguish the
   *         transport_status from the overal HTTP request status.
   */
  util::Status ExecuteAndParseResponse(
      ServiceAccount* data) {
    return StorageServiceBaseRequest::ExecuteAndParseResponse(data);
  }

 private:
  string project_id_;
  string user_project_;
  bool _have_user_project_ : 1;
  DISALLOW_COPY_AND_ASSIGN(ProjectsResource_ServiceAccountResource_GetMethod);
};



/**
 * Service definition for StorageService (v1).
 *
 * @ingroup ServiceClass
 *
 * For more information about this service, see the API Documentation at
 * <a href='https://developers.google.com/storage/docs/json_api/'>'https://developers.google.com/storage/docs/json_api/</a>
 */
class StorageService : public client::ClientService {
 public:
  /**
   * The name of the API that this was generated from.
   */
  static const char googleapis_API_NAME[];

  /**
   * The version of the API that this interface was generated from.
   */
  static const char googleapis_API_VERSION[];

  /**
   * The code generator used to generate this API.
   */
  static const char googleapis_API_GENERATOR[];


  /**
   * Acts as message factory for accessing  data.
   *
   * @ingroup ServiceClass
   */
  class BucketAccessControlsResource {
   public:
    /**
     * Standard constructor.
     *
     * @param[in] service  The service instance is used to bind to the
     *            methods created from this resource instance.  This will be
     *            the service that methods are invoked on.
     */
    explicit BucketAccessControlsResource(StorageService* service);

    /**
     * Standard destructor.
     */
    ~BucketAccessControlsResource() {}


    /**
     * Creates a new BucketAccessControlsResource_DeleteMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @param[in] entity The entity holding the permission. Can be user-userId,
     * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
     * allAuthenticatedUsers.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    BucketAccessControlsResource_DeleteMethod* NewDeleteMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const StringPiece& entity) const;

    /**
     * Creates a new BucketAccessControlsResource_GetMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @param[in] entity The entity holding the permission. Can be user-userId,
     * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
     * allAuthenticatedUsers.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    BucketAccessControlsResource_GetMethod* NewGetMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const StringPiece& entity) const;

    /**
     * Creates a new BucketAccessControlsResource_InsertMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @param[in] _content_ The data object to insert.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    BucketAccessControlsResource_InsertMethod* NewInsertMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const BucketAccessControl& _content_) const;

    /**
     * Creates a new BucketAccessControlsResource_ListMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    BucketAccessControlsResource_ListMethod* NewListMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket) const;

    /**
     * Creates a new BucketAccessControlsResource_PatchMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @param[in] entity The entity holding the permission. Can be user-userId,
     * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
     * allAuthenticatedUsers.
     * @param[in] _content_ The data object to patch.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    BucketAccessControlsResource_PatchMethod* NewPatchMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const StringPiece& entity,
        const BucketAccessControl& _content_) const;

    /**
     * Creates a new BucketAccessControlsResource_UpdateMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @param[in] entity The entity holding the permission. Can be user-userId,
     * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
     * allAuthenticatedUsers.
     * @param[in] _content_ The data object to update.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    BucketAccessControlsResource_UpdateMethod* NewUpdateMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const StringPiece& entity,
        const BucketAccessControl& _content_) const;

   private:
    StorageService* service_;

    DISALLOW_COPY_AND_ASSIGN(BucketAccessControlsResource);
  };

  /**
   * Acts as message factory for accessing  data.
   *
   * @ingroup ServiceClass
   */
  class BucketsResource {
   public:
    /**
     * Standard constructor.
     *
     * @param[in] service  The service instance is used to bind to the
     *            methods created from this resource instance.  This will be
     *            the service that methods are invoked on.
     */
    explicit BucketsResource(StorageService* service);

    /**
     * Standard destructor.
     */
    ~BucketsResource() {}


    /**
     * Creates a new BucketsResource_DeleteMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    BucketsResource_DeleteMethod* NewDeleteMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket) const;

    /**
     * Creates a new BucketsResource_GetMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    BucketsResource_GetMethod* NewGetMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket) const;

    /**
     * Creates a new BucketsResource_GetIamPolicyMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    BucketsResource_GetIamPolicyMethod* NewGetIamPolicyMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket) const;

    /**
     * Creates a new BucketsResource_InsertMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] project A valid API project identifier.
     * @param[in] _content_ The data object to insert.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    BucketsResource_InsertMethod* NewInsertMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& project,
        const Bucket& _content_) const;

    /**
     * Creates a new BucketsResource_ListMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] project A valid API project identifier.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    BucketsResource_ListMethod* NewListMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& project) const;

    /**
     * Creates a pager for iterating over incremental result pages.
     * @param[in] _credential_  NULL credentials will not authorize the request.
     * @param[in] project A valid API project identifier.
     *
     *
     * @see googleapis::googleapis::ServiceRequestPager
     */
    BucketsResource_ListMethodPager* NewListMethodPager(
        client::AuthorizationCredential* _credential_,
        const StringPiece& project) const;

    /**
     * Creates a new BucketsResource_PatchMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @param[in] _content_ The data object to patch.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    BucketsResource_PatchMethod* NewPatchMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const Bucket& _content_) const;

    /**
     * Creates a new BucketsResource_SetIamPolicyMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @param[in] _content_ The data object to setIamPolicy.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    BucketsResource_SetIamPolicyMethod* NewSetIamPolicyMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const Policy& _content_) const;

    /**
     * Creates a new BucketsResource_TestIamPermissionsMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @param[in] permissions Permissions to test.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    BucketsResource_TestIamPermissionsMethod* NewTestIamPermissionsMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const client::JsonCppArray<string >& permissions) const;

    /**
     * Creates a new BucketsResource_UpdateMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @param[in] _content_ The data object to update.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    BucketsResource_UpdateMethod* NewUpdateMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const Bucket& _content_) const;

   private:
    StorageService* service_;

    DISALLOW_COPY_AND_ASSIGN(BucketsResource);
  };

  /**
   * Acts as message factory for accessing  data.
   *
   * @ingroup ServiceClass
   */
  class ChannelsResource {
   public:
    /**
     * Standard constructor.
     *
     * @param[in] service  The service instance is used to bind to the
     *            methods created from this resource instance.  This will be
     *            the service that methods are invoked on.
     */
    explicit ChannelsResource(StorageService* service);

    /**
     * Standard destructor.
     */
    ~ChannelsResource() {}


    /**
     * Creates a new ChannelsResource_StopMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] _content_ The data object to stop.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    ChannelsResource_StopMethod* NewStopMethod(
        client::AuthorizationCredential* _credential_,
        const Channel& _content_) const;

   private:
    StorageService* service_;

    DISALLOW_COPY_AND_ASSIGN(ChannelsResource);
  };

  /**
   * Acts as message factory for accessing  data.
   *
   * @ingroup ServiceClass
   */
  class DefaultObjectAccessControlsResource {
   public:
    /**
     * Standard constructor.
     *
     * @param[in] service  The service instance is used to bind to the
     *            methods created from this resource instance.  This will be
     *            the service that methods are invoked on.
     */
    explicit DefaultObjectAccessControlsResource(StorageService* service);

    /**
     * Standard destructor.
     */
    ~DefaultObjectAccessControlsResource() {}


    /**
     * Creates a new DefaultObjectAccessControlsResource_DeleteMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @param[in] entity The entity holding the permission. Can be user-userId,
     * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
     * allAuthenticatedUsers.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    DefaultObjectAccessControlsResource_DeleteMethod* NewDeleteMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const StringPiece& entity) const;

    /**
     * Creates a new DefaultObjectAccessControlsResource_GetMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @param[in] entity The entity holding the permission. Can be user-userId,
     * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
     * allAuthenticatedUsers.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    DefaultObjectAccessControlsResource_GetMethod* NewGetMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const StringPiece& entity) const;

    /**
     * Creates a new DefaultObjectAccessControlsResource_InsertMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @param[in] _content_ The data object to insert.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    DefaultObjectAccessControlsResource_InsertMethod* NewInsertMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const ObjectAccessControl& _content_) const;

    /**
     * Creates a new DefaultObjectAccessControlsResource_ListMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    DefaultObjectAccessControlsResource_ListMethod* NewListMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket) const;

    /**
     * Creates a new DefaultObjectAccessControlsResource_PatchMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @param[in] entity The entity holding the permission. Can be user-userId,
     * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
     * allAuthenticatedUsers.
     * @param[in] _content_ The data object to patch.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    DefaultObjectAccessControlsResource_PatchMethod* NewPatchMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const StringPiece& entity,
        const ObjectAccessControl& _content_) const;

    /**
     * Creates a new DefaultObjectAccessControlsResource_UpdateMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @param[in] entity The entity holding the permission. Can be user-userId,
     * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
     * allAuthenticatedUsers.
     * @param[in] _content_ The data object to update.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    DefaultObjectAccessControlsResource_UpdateMethod* NewUpdateMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const StringPiece& entity,
        const ObjectAccessControl& _content_) const;

   private:
    StorageService* service_;

    DISALLOW_COPY_AND_ASSIGN(DefaultObjectAccessControlsResource);
  };

  /**
   * Acts as message factory for accessing  data.
   *
   * @ingroup ServiceClass
   */
  class NotificationsResource {
   public:
    /**
     * Standard constructor.
     *
     * @param[in] service  The service instance is used to bind to the
     *            methods created from this resource instance.  This will be
     *            the service that methods are invoked on.
     */
    explicit NotificationsResource(StorageService* service);

    /**
     * Standard destructor.
     */
    ~NotificationsResource() {}


    /**
     * Creates a new NotificationsResource_DeleteMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket The parent bucket of the notification.
     * @param[in] notification ID of the notification to delete.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    NotificationsResource_DeleteMethod* NewDeleteMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const StringPiece& notification) const;

    /**
     * Creates a new NotificationsResource_GetMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket The parent bucket of the notification.
     * @param[in] notification Notification ID.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    NotificationsResource_GetMethod* NewGetMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const StringPiece& notification) const;

    /**
     * Creates a new NotificationsResource_InsertMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket The parent bucket of the notification.
     * @param[in] _content_ The data object to insert.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    NotificationsResource_InsertMethod* NewInsertMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const Notification& _content_) const;

    /**
     * Creates a new NotificationsResource_ListMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a Google Cloud Storage bucket.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    NotificationsResource_ListMethod* NewListMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket) const;

   private:
    StorageService* service_;

    DISALLOW_COPY_AND_ASSIGN(NotificationsResource);
  };

  /**
   * Acts as message factory for accessing  data.
   *
   * @ingroup ServiceClass
   */
  class ObjectAccessControlsResource {
   public:
    /**
     * Standard constructor.
     *
     * @param[in] service  The service instance is used to bind to the
     *            methods created from this resource instance.  This will be
     *            the service that methods are invoked on.
     */
    explicit ObjectAccessControlsResource(StorageService* service);

    /**
     * Standard destructor.
     */
    ~ObjectAccessControlsResource() {}


    /**
     * Creates a new ObjectAccessControlsResource_DeleteMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @param[in] object Name of the object. For information about how to URL
     * encode object names to be path safe, see Encoding URI Path Parts.
     * @param[in] entity The entity holding the permission. Can be user-userId,
     * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
     * allAuthenticatedUsers.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    ObjectAccessControlsResource_DeleteMethod* NewDeleteMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const StringPiece& object,
        const StringPiece& entity) const;

    /**
     * Creates a new ObjectAccessControlsResource_GetMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @param[in] object Name of the object. For information about how to URL
     * encode object names to be path safe, see Encoding URI Path Parts.
     * @param[in] entity The entity holding the permission. Can be user-userId,
     * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
     * allAuthenticatedUsers.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    ObjectAccessControlsResource_GetMethod* NewGetMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const StringPiece& object,
        const StringPiece& entity) const;

    /**
     * Creates a new ObjectAccessControlsResource_InsertMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @param[in] object Name of the object. For information about how to URL
     * encode object names to be path safe, see Encoding URI Path Parts.
     * @param[in] _content_ The data object to insert.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    ObjectAccessControlsResource_InsertMethod* NewInsertMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const StringPiece& object,
        const ObjectAccessControl& _content_) const;

    /**
     * Creates a new ObjectAccessControlsResource_ListMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @param[in] object Name of the object. For information about how to URL
     * encode object names to be path safe, see Encoding URI Path Parts.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    ObjectAccessControlsResource_ListMethod* NewListMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const StringPiece& object) const;

    /**
     * Creates a new ObjectAccessControlsResource_PatchMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @param[in] object Name of the object. For information about how to URL
     * encode object names to be path safe, see Encoding URI Path Parts.
     * @param[in] entity The entity holding the permission. Can be user-userId,
     * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
     * allAuthenticatedUsers.
     * @param[in] _content_ The data object to patch.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    ObjectAccessControlsResource_PatchMethod* NewPatchMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const StringPiece& object,
        const StringPiece& entity,
        const ObjectAccessControl& _content_) const;

    /**
     * Creates a new ObjectAccessControlsResource_UpdateMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of a bucket.
     * @param[in] object Name of the object. For information about how to URL
     * encode object names to be path safe, see Encoding URI Path Parts.
     * @param[in] entity The entity holding the permission. Can be user-userId,
     * user-emailAddress, group-groupId, group-emailAddress, allUsers, or
     * allAuthenticatedUsers.
     * @param[in] _content_ The data object to update.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    ObjectAccessControlsResource_UpdateMethod* NewUpdateMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const StringPiece& object,
        const StringPiece& entity,
        const ObjectAccessControl& _content_) const;

   private:
    StorageService* service_;

    DISALLOW_COPY_AND_ASSIGN(ObjectAccessControlsResource);
  };

  /**
   * Acts as message factory for accessing  data.
   *
   * @ingroup ServiceClass
   */
  class ObjectsResource {
   public:
    /**
     * Standard constructor.
     *
     * @param[in] service  The service instance is used to bind to the
     *            methods created from this resource instance.  This will be
     *            the service that methods are invoked on.
     */
    explicit ObjectsResource(StorageService* service);

    /**
     * Standard destructor.
     */
    ~ObjectsResource() {}


    /**
     * Creates a new ObjectsResource_ComposeMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] destination_bucket Name of the bucket in which to store the
     * new object.
     * @param[in] destination_object Name of the new object. For information
     * about how to URL encode object names to be path safe, see Encoding URI
     * Path Parts.
     * @param[in] _content_ The data object to compose.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    ObjectsResource_ComposeMethod* NewComposeMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& destination_bucket,
        const StringPiece& destination_object,
        const ComposeRequest& _content_) const;

    /**
     * Creates a new ObjectsResource_CopyMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] source_bucket Name of the bucket in which to find the source
     * object.
     * @param[in] source_object Name of the source object. For information about
     * how to URL encode object names to be path safe, see Encoding URI Path
     * Parts.
     * @param[in] destination_bucket Name of the bucket in which to store the
     * new object. Overrides the provided object metadata's bucket value, if
     * any.For information about how to URL encode object names to be path safe,
     * see Encoding URI Path Parts.
     * @param[in] destination_object Name of the new object. Required when the
     * object metadata is not otherwise provided. Overrides the object
     * metadata's name value, if any.
     * @param[in] _content_ The data object to copy.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    ObjectsResource_CopyMethod* NewCopyMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& source_bucket,
        const StringPiece& source_object,
        const StringPiece& destination_bucket,
        const StringPiece& destination_object,
        const Object& _content_) const;

    /**
     * Creates a new ObjectsResource_DeleteMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of the bucket in which the object resides.
     * @param[in] object Name of the object. For information about how to URL
     * encode object names to be path safe, see Encoding URI Path Parts.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    ObjectsResource_DeleteMethod* NewDeleteMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const StringPiece& object) const;

    /**
     * Creates a new ObjectsResource_GetMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of the bucket in which the object resides.
     * @param[in] object Name of the object. For information about how to URL
     * encode object names to be path safe, see Encoding URI Path Parts.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    ObjectsResource_GetMethod* NewGetMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const StringPiece& object) const;

    /**
     * Creates a new ObjectsResource_GetIamPolicyMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of the bucket in which the object resides.
     * @param[in] object Name of the object. For information about how to URL
     * encode object names to be path safe, see Encoding URI Path Parts.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    ObjectsResource_GetIamPolicyMethod* NewGetIamPolicyMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const StringPiece& object) const;


    /**
     * Creates a new ObjectsResource_InsertMethod instance.
     * @deprecated
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of the bucket in which to store the new object.
     * Overrides the provided object metadata's bucket value, if any.
     *
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    ObjectsResource_InsertMethod* NewInsertMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket) const;

    /**
     * Creates a new ObjectsResource_InsertMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of the bucket in which to store the new object.
     * Overrides the provided object metadata's bucket value, if any.
     * @param[in] _metadata_ The metadata object to insert. If this is NULL then
     * do not upload any metadata.
     * @param[in] _media_content_type_ The content type of the data in the
     * _media_content_reader_.
     * @param[in] _media_content_reader_ The media content to insert. If
     * this is NULL then do not upload any media and ignore
     * _media_content_type_.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    ObjectsResource_InsertMethod* NewInsertMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const Object* _metadata_,
        const char* _media_content_type_,
        client::DataReader* _media_content_reader_) const;

    /**
     * Creates a new ObjectsResource_ListMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of the bucket in which to look for objects.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    ObjectsResource_ListMethod* NewListMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket) const;

    /**
     * Creates a pager for iterating over incremental result pages.
     * @param[in] _credential_  NULL credentials will not authorize the request.
     * @param[in] bucket Name of the bucket in which to look for objects.
     *
     *
     * @see googleapis::googleapis::ServiceRequestPager
     */
    ObjectsResource_ListMethodPager* NewListMethodPager(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket) const;

    /**
     * Creates a new ObjectsResource_PatchMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of the bucket in which the object resides.
     * @param[in] object Name of the object. For information about how to URL
     * encode object names to be path safe, see Encoding URI Path Parts.
     * @param[in] _content_ The data object to patch.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    ObjectsResource_PatchMethod* NewPatchMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const StringPiece& object,
        const Object& _content_) const;

    /**
     * Creates a new ObjectsResource_RewriteMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] source_bucket Name of the bucket in which to find the source
     * object.
     * @param[in] source_object Name of the source object. For information about
     * how to URL encode object names to be path safe, see Encoding URI Path
     * Parts.
     * @param[in] destination_bucket Name of the bucket in which to store the
     * new object. Overrides the provided object metadata's bucket value, if
     * any.
     * @param[in] destination_object Name of the new object. Required when the
     * object metadata is not otherwise provided. Overrides the object
     * metadata's name value, if any. For information about how to URL encode
     * object names to be path safe, see Encoding URI Path Parts.
     * @param[in] _content_ The data object to rewrite.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    ObjectsResource_RewriteMethod* NewRewriteMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& source_bucket,
        const StringPiece& source_object,
        const StringPiece& destination_bucket,
        const StringPiece& destination_object,
        const Object& _content_) const;

    /**
     * Creates a new ObjectsResource_SetIamPolicyMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of the bucket in which the object resides.
     * @param[in] object Name of the object. For information about how to URL
     * encode object names to be path safe, see Encoding URI Path Parts.
     * @param[in] _content_ The data object to setIamPolicy.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    ObjectsResource_SetIamPolicyMethod* NewSetIamPolicyMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const StringPiece& object,
        const Policy& _content_) const;

    /**
     * Creates a new ObjectsResource_TestIamPermissionsMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of the bucket in which the object resides.
     * @param[in] object Name of the object. For information about how to URL
     * encode object names to be path safe, see Encoding URI Path Parts.
     * @param[in] permissions Permissions to test.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    ObjectsResource_TestIamPermissionsMethod* NewTestIamPermissionsMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const StringPiece& object,
        const client::JsonCppArray<string >& permissions) const;

    /**
     * Creates a new ObjectsResource_UpdateMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of the bucket in which the object resides.
     * @param[in] object Name of the object. For information about how to URL
     * encode object names to be path safe, see Encoding URI Path Parts.
     * @param[in] _content_ The data object to update.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    ObjectsResource_UpdateMethod* NewUpdateMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const StringPiece& object,
        const Object& _content_) const;

    /**
     * Creates a new ObjectsResource_WatchAllMethod instance.
     *
     * @param[in] _credential_  Can be NULL.
     *            NULL credentials will not authorize the request.
     * @param[in] bucket Name of the bucket in which to look for objects.
     * @param[in] _content_ The data object to watchAll.
     * @returns  The caller should <code>Execute</code> the method instance,
     *           then destroy it when they are finished.
     */
    ObjectsResource_WatchAllMethod* NewWatchAllMethod(
        client::AuthorizationCredential* _credential_,
        const StringPiece& bucket,
        const Channel& _content_) const;

   private:
    StorageService* service_;

    DISALLOW_COPY_AND_ASSIGN(ObjectsResource);
  };

  /**
   * Acts as message factory for accessing  data.
   *
   * @ingroup ServiceClass
   */
  class ProjectsResource {
   public:
    /**
     * Standard constructor.
     *
     * @param[in] service  The service instance is used to bind to the
     *            methods created from this resource instance.  This will be
     *            the service that methods are invoked on.
     */
    explicit ProjectsResource(StorageService* service);

    /**
     * Standard destructor.
     */
    ~ProjectsResource() {}

    /**
     * Acts as message factory for accessing  data.
     *
     * @ingroup ServiceClass
     */
    class ServiceAccountResource {
     public:
      /**
       * Standard constructor.
       *
       * @param[in] service  The service instance is used to bind to the
       *            methods created from this resource instance.  This will be
       *            the service that methods are invoked on.
       */
      explicit ServiceAccountResource(StorageService* service);

      /**
       * Standard destructor.
       */
      ~ServiceAccountResource() {}


      /**
       * Creates a new ProjectsResource_ServiceAccountResource_GetMethod
       * instance.
       *
       * @param[in] _credential_  Can be NULL.
       *            NULL credentials will not authorize the request.
       * @param[in] project_id Project ID.
       * @returns  The caller should <code>Execute</code> the method instance,
       *           then destroy it when they are finished.
       */
      ProjectsResource_ServiceAccountResource_GetMethod* NewGetMethod(
          client::AuthorizationCredential* _credential_,
          const StringPiece& project_id) const;

     private:
      StorageService* service_;

      DISALLOW_COPY_AND_ASSIGN(ServiceAccountResource);
    };
    /**
     * Gets the serviceAccount resource method factory.
     *
     * @return ServiceAccountResource for creating methods.
     */
    const ServiceAccountResource& get_service_account() const {
      return service_account_;
    }



   private:
    StorageService* service_;
    ServiceAccountResource service_account_;

    DISALLOW_COPY_AND_ASSIGN(ProjectsResource);
  };



  /**
   * Standard constructor.
   *
   * @param[in] transport  The transport to use when creating methods to invoke
   *                       on this service instance.
   */
  explicit StorageService(client::HttpTransport* transport);

  /**
   * Standard destructor.
   */
  virtual ~StorageService();

  /**
   * Gets the  resource method factory.
   *
   * @return BucketAccessControlsResource for creating methods.
   */
  const BucketAccessControlsResource& get_bucket_access_controls() const {
    return bucket_access_controls_;
  }


  /**
   * Gets the  resource method factory.
   *
   * @return BucketsResource for creating methods.
   */
  const BucketsResource& get_buckets() const {
    return buckets_;
  }


  /**
   * Gets the  resource method factory.
   *
   * @return ChannelsResource for creating methods.
   */
  const ChannelsResource& get_channels() const {
    return channels_;
  }


  /**
   * Gets the  resource method factory.
   *
   * @return DefaultObjectAccessControlsResource for creating methods.
   */
  const DefaultObjectAccessControlsResource& get_default_object_access_controls() const {
    return default_object_access_controls_;
  }


  /**
   * Gets the  resource method factory.
   *
   * @return NotificationsResource for creating methods.
   */
  const NotificationsResource& get_notifications() const {
    return notifications_;
  }


  /**
   * Gets the  resource method factory.
   *
   * @return ObjectAccessControlsResource for creating methods.
   */
  const ObjectAccessControlsResource& get_object_access_controls() const {
    return object_access_controls_;
  }


  /**
   * Gets the  resource method factory.
   *
   * @return ObjectsResource for creating methods.
   */
  const ObjectsResource& get_objects() const {
    return objects_;
  }


  /**
   * Gets the  resource method factory.
   *
   * @return ProjectsResource for creating methods.
   */
  const ProjectsResource& get_projects() const {
    return projects_;
  }

  /**
   * Declares the OAuth2.0 scopes used within Cloud Storage JSON API
   *
   * These scopes shoudl be used when asking for credentials to invoke methods
   * in the StorageService.
   */
  class SCOPES {
   public:
    /**
     * View and manage your data across Google Cloud Platform services.
     */
    static const char CLOUD_PLATFORM[];

    /**
     * View your data across Google Cloud Platform services.
     */
    static const char CLOUD_PLATFORM_READ_ONLY[];

    /**
     * Manage your data and permissions in Google Cloud Storage.
     */
    static const char DEVSTORAGE_FULL_CONTROL[];

    /**
     * View your data in Google Cloud Storage.
     */
    static const char DEVSTORAGE_READ_ONLY[];

    /**
     * Manage your data in Google Cloud Storage.
     */
    static const char DEVSTORAGE_READ_WRITE[];

   private:
    SCOPES();  // Never instantiated.
    ~SCOPES();  // Never instantiated.
  };

 private:
  BucketAccessControlsResource bucket_access_controls_;
  BucketsResource buckets_;
  ChannelsResource channels_;
  DefaultObjectAccessControlsResource default_object_access_controls_;
  NotificationsResource notifications_;
  ObjectAccessControlsResource object_access_controls_;
  ObjectsResource objects_;
  ProjectsResource projects_;

  DISALLOW_COPY_AND_ASSIGN(StorageService);
};


/**
 * @defgroup DataObject Cloud Storage JSON API Data Objects
 *
 * The data objects are used as parameters and responses from service requests.
 * For more information about using data objects, see the
 * <a href='https://developers.google.com/api-client-library/cpp/'>
 * Google APIs Client Library for C++ Developers's Guide</a>.
 */

/**
 * @defgroup ServiceClass Cloud Storage JSON API Service
 *
 * The service classes contain information about accessing and using the
 * Cloud Storage JSON API cloud service.
 *
 * For more information about using services, see the
 * <a href='https://developers.google.com/api-client-library/cpp/'>
 * Google APIs Client Library for C++ Developers's Guide</a>.
 */

/**
 * @defgroup ServiceMethod Cloud Storage JSON API Service Methods
 *
 * The service method classes are used to create and invoke methods in the
 * StorageService to access the Cloud Storage JSON API.
 *
 * For more information about using services, see the
 * <a href='https://developers.google.com/api-client-library/cpp/'>
 * Google APIs Client Library for C++ Developers's Guide</a>.
 */
}  // namespace google_storage_api
#endif  // GOOGLE_STORAGE_API_STORAGE_SERVICE_H_
